On Jul 22, 2004, at 10:25 AM, Erin Sharmahd wrote:
Ok, so I'm going to try to explain this situation: I have a php page, and I need to be able to access the windows domain username of the client accessing the page. I've googled and seen ways to do this if the php is running through IIS, but in this situation, php is running through apache, and those don't seem to work. I've tried using things like $_SERVER, but they're returning null If i can't figure this out, I'll probably end up having to write this all in asp instead, so i'm hoping to get it working! thanks in advance!
This is actually an IIS + IE thing. You have to turn on authentication in IIS for your website(it is under the Security or the Directory Security tab, then the Authentication Control section), turn off anonymous access, and make sure that domain authentication (I think it's actually called Integrated Windows Authentication), or some such option, is enabled. Then, when you access the website using IE, it will use the Windows username, and it will appear as a Request variable called AUTH_USER. This should be true regardless of whether your page is written in ASP or PHP. I don't remember what happens when you access it using something other than IE (I think it prompts you), but unless Apache has a similar authentication plug-in (and it may), then you will need to use IIS and PHP. It's a much better idea to have your login portion use Basic authentication or DB authentication over SSL.
Grant
____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
