Hello, I am running Apache 2.0.40 and PHP 4.2.3 under RedHat Linux 7.3 (Apache and PHP have been installed and compiled separately, they were not installed by RedHat - nor any older versions of them either). PHP is compiled as a shared module for Apache. It works fine, but...
I have configured Safe Mode in php.ini and set User and Group to "www" in httpd.conf for Apache. Every time I try to run a PHP script (i.e. access a PHP page from the web, something as trivial as one containing only <?php echo "test"; ?> or similar) I get the following error: Warning: SAFE MODE Restriction in effect. The script whose uid/gid is -1/-1 is not allowed to access /.../test.php owned by uid/gid 123/456 in Unknown on line 0 Warning: Failed opening '/.../test.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0 I have omitted paths and changed the latter uid/gid pair. But they are representative. -1/-1 is what they PHP tries to run under, and the file test.php is owned by a valid user/group. I have set User and Group in httpd.conf to something other than -1 and ps shows Apache running accordingly (as do tests with access rights and normal HTML files, no problems there - Apache authenticates against www). The problem is: Apache respects my settings of User and Group. PHP does not. And since I'm runnig Safe Mode, PHP does not serve any files to anyone, since any file it would serve should have -1/-1 as uid/gid. If I disable Safe Mode, everything works fine. The question is: Any suggestions as to how I could configure PHP to run as "www" or some other user/group combination, instead of defaulting to -1/-1? I have tried SuexecUserGroup but it doesn't seem to have any effect (nor should it, I guess, I'm not running PHP as a CGI after all). Any suggestions would be most welcome. Thank you very much! Best Regards. Janne Sirén -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php