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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to