RE: [PHP] Get the HTTP Server Username

From: Date: Sat, 29 Mar 2003 02:34:43 +0000
Subject: RE: [PHP] Get the HTTP Server Username
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141537@lists.php.net to get a copy of this message
On 28-Mar-2003 Chris Shiflett wrote: > --- Mike <php-digest@custom87.net> wrote: >> Is there anyway to get the HTTP Server Username (something like >> $_SERVER['username']) I tried printing all the variables defined in a >> page (and looking at a phpinfo.php) and wasn't able to figure it out... > > --- Don Read <dread@texas.net> wrote: >> $_SERVER['PHP_AUTH_USER']; > > Mike, > I see it in phpinfo(). Search for "User/Group". I'm on Apache. > > Don, read this: > http://www.php.net/manual/en/features.http-auth.php > > Chris > Yep. I thought he was looking for the authenticated 'username' ... In private I sent this snippet: $px=posix_getpwuid(posix_getuid()); echo $px['name'], '<P>'; Which is (or should be) the Apache server uid. Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#141537) next »