Entry
Why can I run a script on the command line but not from PHP?
Why can I use C to system call PHP and httpd fork PHP, but can't use httpd fork C to call PHP ?
Jan 22nd, 2000 17:36
Nathan Wallace, Gary Chen, Richard Lynch
First, check that you can run the script on the command line when logged
in as the user which PHP is running as. If you have PHP running as an
Apache module this will most likely be the user nobody. You can do this
by logging in as root and then doing:
su nobody
If the scripts works when acting as the PHP user it should work from
PHP.
Another good thing to check is if there any files/resources that your
script needs to read/write/execute that the PHP user can't do.