passthru
| From: | Michael Dickson | Date: | Wed, 11 Apr 2001 19:27:06 +0000 |
| Subject: | passthru | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-48194@lists.php.net to get a copy of this message | ||
On the server itself (to which I have root access) I type:
someProgram arg1 arg2 arg3
and it runs properly, returning the proper output to standard output (the
screen). I can do this from anywhere on the server (for example, from the
same directory where my php scripts are located, /var/www/html/blah), and I
can do it as the same user that apache runs as ('apache').
BUT, when I try:
<?php passthru("someProgram arg1 arg2 arg3"); ?>
it fails. I get no output at all. I can check that everything else is ok
by doing something like
<?php passthru("someProgram arg1 arg2 arg3"); passthru("echo
'finished'");
?>
which then returns just the word 'finished' to the browser.
I CAN do other things via passthru, for example,
<?php passthru("man tar"); ?>, and
<?php passthru("ls -al"); ?>
and so on. I am running php as an apache module. I am NOT running php in
'safe mode'.
Any ideas what is going wrong here?
Thanks,
Michael Dickson