Re: getting authentication information from apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, February 21, 2007 1:01 pm, Ryan wrote:
> I'm new to php and I have am running php on apache. I already have
> ldap
> authentication set up in apache would rather not create a separate
> system
> for php. What would be ideal would be to get the current authenticated
> user
> from the apache environment. At this point I'm grabbing at straws, but
> so
> far I've tried....
>
> $ret = apache_getenv("LDAP_USER");
> echo $ret;
> echo $_SERVER['REMOTE_USER'];
> echo $_SERVER['PHP_AUTH_DIGEST'];
> $ret = apache_getenv('PHP_AUTH_DIGEST');
>
> None of these work. Has anyone done this??

If the answer you are seeking isn't available in:
<?php phpinfo();?>
run on the page where you are trying to do this, then you probably
can't get the answer you want.

Running http://php.net/ldap to re-connect and re-authenticate will
probably be fairly cheap, since LDAP is supposed to be pretty dang
fast in the first place, and whatever caching is going on for the LDAP
or OS calls behind LDAP virtually guarantees that the data you want is
in RAM.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux