Hi,

At my box the sub-processes run as user www with uid 80, and that will
be the owner of created files also. Still I am worried, because the
apache master process runs as root, then spawns sub-processes as user
www and these sub-processes spawn the PHP processes as user www also,
yet they get root's environment? That seems totally wrong, because if
the PHP process gets root's environment, then who know's what it gets
from root besides that. 

When I search for other phpinfo pages I find zillions with a 'healthy'
enviroment for the scripts like the second url (phpinfo2.html) and
thus far I have found none that look like mine. Yes, you tell me that
yours looks like mine, but I'm not convinced that it should be like
this though.

And in the event that it is not harmful, then I am still curious what
causes this difference.

Regards,

Terrence Koeman


On Mon, 23 Dec 2002 22:41:13 -0500, [EMAIL PROTECTED] (John) wrote:

>My phpinfo() section looks pretty much the same as yours.
>
>I think PHP is not actually running as root--if you look in the Apache 
>section, you should find a User/Group section that has the actual user 
>account PHP uses. Mine lists nobody(99)/99, and that's the owner of any 
>files I create from a PHP page...
>
>Apache is generally started by root, and then spawns sub-processes 
>running as a non-privileged user. These sub-processes handle the actual 
>requests. It looks to me that Apache doesn't change the system 
>environment for these sub-processes--it just changes the user account 
>they run under.
>
>Hope that helps,
>John Locke
>http://freelock.com
>
>Terrence Koeman wrote:
>
>>PHP 4.2.3 on Apache 1.3.27 on FreeBSD 4.7-STABLE; 
>>Apache runs with uid/gid 80/80 and php is loaded as module.
>>
>>For some reason all PHP scripts on my box run in root's environment
>>instead of one created by apache. 
>>
>>This is the environment section from phpinfo:
>>http://ra.phid.ae/phpinfo.html 
>>
>>And I guess it should look like this: http://ra.phid.ae/phpinfo2.html 
>>
>>The issue remains if I rename the php.ini to something else to get the
>>default values and restart apache.
>>
>>CGI scripts (perl) have the right environment, so i'm pretty sure it's
>>a PHP thing. 
>>
>>Any ideas? Thanks in advance.
>>
>>  
>>
>
>


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

Reply via email to