How to get windows auth user

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sathish.hc
Forum Newbie
Posts: 15
Joined: Tue May 23, 2006 2:55 am

How to get windows auth user

Post by sathish.hc »

Hi all,

I am using PHP apache running windows. My requirement is how to get remote user. If PHP is running on windows and IIS I can get remote user by following steps

1) Right click on Mycomputer select management.
2) Expand Service and Application
3) Select default website(IIS) and right click on it select properties
4) Select directory security tab and click on edit botton
5) Uncheck access to anonymouse user and check integrated windows authentication


then we can get remote user using $_SERVER['AUTH_USER'].


My question is how to get same thing with window and apache
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

sathish.hc
Forum Newbie
Posts: 15
Joined: Tue May 23, 2006 2:55 am

Post by sathish.hc »

Where to get mod_ntlm for windows/apache.
sathish.hc
Forum Newbie
Posts: 15
Joined: Tue May 23, 2006 2:55 am

Post by sathish.hc »

I configured apache with mod_ntlm like this

1) Downloaded mod_ntlm from suggested url
2) Copied mod_ntlm.so to apache modules dir
3) Added two lines

LoadModule ntlm_module modules/mod_ntlm.so
AddModule mod_ntlm.c
in httpd.conf


But still $_SERVER['AUTH_USER'] is not working its giving error like this
Notice: Undefined index: AUTH_USER in c:\program files\apache group\apache\htdocs\ldaptest\autologin.php on line 3

any one can help regarding this
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Post Reply