Posted by Robert S on 07/07/06 23:03
I would like to display error messages put out by shell commands. For
example the following code gives no output and the array $output has no
values:
<?php
exec( 'lss', $output );
var_dump( $output );
?>
...assuming that I don't have an executable called 'lss' on my computer.
The equivalent on the command line displays the error message:
# php -r 'exec( "lss", $output );'
# sh: lss: command not found
How do I get the exec() command to display errors?
I've tried `exec( 'lss 2> /dev/stout', $output );' with no success.
[Back to original message]
|