A
A
Alexander Afanasiev2017-04-10 12:41:59
linux
Alexander Afanasiev, 2017-04-10 12:41:59

Why doesn't exec run the program?

Hello.
I need to convert html to rtf, for this I use unoconv. When manually launched from the console, everything works great. Next, I try to run the conversion from php:

<?php 
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

echo "start";   

$command = "ls";
$rez = exec($command, $output, $return_var);
print_r($rez);
print_r($output);
print_r($return_var);

$command = "unoconv --help";
$rez = exec($command, $output2, $return_var2);
print_r($rez);
print_r($output2);
print_r($return_var2);

echo "stop";

ls, other applications from usr/local/bin work, but unoconv does not. returns the error code $return_var2 = "1" and that's it, the output is empty. what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mi7teR, 2017-04-10
@Mi7teR

try specifying the full path to the binary

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question