PDA

View Full Version : PHP's user


v2k
1st April 2008, 09:01
Running perfect setup fedora 7.

Warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 500 is not allowed to access /var/www/html/test owned by uid 48 in /var/www/html/test.php on line 139

apache is user 48 and that's the user that is running apache. however, php is running as another user on the system. how do I get it to run php using the apache user?

topdog
1st April 2008, 14:08
You cannot do that if you are using safe mode http://www.php.net/manual/en/features.safe-mode.php

v2k
1st April 2008, 20:01
I was just trying to get everything running through safe_mode. I think what was happening is that not all the php files were owned by apache. So when it included some files by other users it switched its uid. I did a:

chown -hR apache /html/*

and that seems to have worked on my test server.