On 28-Mar-2003 Chris Shiflett wrote:
> --- Mike <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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                                       [EMAIL PROTECTED]
-- 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.

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

Reply via email to