Fedora-Apache2-PHP exec() failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm having the same problem as Jim Poserina. Richard pointed out some things to try. Here's my story.

We installed Fedora 3 on a new box. Then we installed Apache 2 and PHP 4.3.9 from the RPMs that came on the CDs. Pretty much everything works as expected, except the exec() functions do not work in the web server. There is no error message displayed in the browser or in the error_log of apache. Here's the script:

<?php
$x = exec("/bin/pwd", $y, $z);
echo "<br>x is "; var_dump( $x );
echo "<br>y is "; var_dump( $y );
echo "<br>z is "; var_dump( $z );
?>

Here is the output:

x is string(0) ""
y is array(0) { }
z is int(127)

If I run the php interpreter from the command line, exec() does work ok. I can turn safe mode on and define a safe_mode_exec_dir and copy /bin/pwd to it and then run that and the command line interpreter honors that setting ok. The web page result doesn't change though. No error message, no output. Just the 127 (-1?)

So, what do I have to change in my setup to get the exec functions to work in the web server?

Thanks,

Bill Rausch

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux