|
Posted by Rasmus Lerdorf on 03/23/05 23:22
Bill Rausch wrote:
> 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?
My guess it that it is an selinux issue. That stuff is such a mess in
Fedora. Try playing with that.
-Rasmus
[Back to original message]
|