Page 1 of 1

Authenticating Window's users?

Posted: Wed Jun 13, 2007 1:27 pm
by danielwalters6
I'm planning to create a web-based IT Room booking application for my college.
Eventually I wish for the application to use PHP to interact with a mysql database, to display times when the room is booked etc and when the room is free.

Before the main page is displayed, I would like the Windows account to be authenticated...

If a student, then a read-only timetable is displayed. Or if a tutor then a editable booking table appears.

If it's not possible to find the group the user belongs to, then if I can find, display and test the username that would also work.

Students at the college have distinct login's. They begin with two digits. "98" or "99" or "01" or "02" or "05" or "07" etc. (The 00's are the year they entered the college")
The staff's usernames don't have any particular pattern.

I know this is possible using "aspx" I'm presuming the same is possible using PHP.

TIA

Dan Walters

Posted: Wed Jun 13, 2007 1:45 pm
by volka
danielwalters6 wrote:I know this is possible using "aspx"
You mean Request.ServerVariables("LOGON_USER") ?
danielwalters6 wrote:I'm presuming the same is possible using PHP
Under certain circumstances the same value is stored in $_SERVER['AUTH_USER']. see http://www.php.net/manual/en/reserved.variables.php

Posted: Wed Jun 13, 2007 1:57 pm
by Weirdan
I believe you can access this info in $_SERVER array if you're running under IIS. For Apache, you will need to install and configure mod_ntlm.

Google for "allintext:iis php ntlm" and "allintext:apache php ntlm"