Click to See Complete Forum and Search --> : PHP5 and $_SERVER['AUTH_USER']


barand
12-08-2005, 05:36 PM
I am trying to migrate an application running on MS server 2000 (php4) to MS server 2003 (php5)

The application is on an intranet and relies on being able to get the username using $_SERVER['LOGON_USER'] or $_SERVER['AUTH_USER'].

I have run a test script on the new server to list all $_SERVER variables and the username ones no longer appear.

I also installed v5 on my WinXP PC and get the same result.

Is this a 'feature' with PHP5 and is there a workaround?

barand
12-09-2005, 04:58 PM
Solved.

It was an IIS issue. I had to to disallow anonymous access. One of those checkboxes hidden behind a button on security tab of the properties dialog.

However, where php4 returned "domain\\username", php5 returns "domain\username"

goldbug
12-09-2005, 11:59 PM
However, where php4 returned "domain\\username", php5 returns "domain\username"
Same exact php.ini? Sounds to me like your PHP5 install has magic_quotes disabled, and your PHP4 didn't. This is all speculation, however :)

Kenne76
10-30-2007, 04:37 AM
I am trying to migrate an application running on MS server 2000 (php4) to MS server 2003 (php5)

The application is on an intranet and relies on being able to get the username using $_SERVER['LOGON_USER'] or $_SERVER['AUTH_USER'].

I have run a test script on the new server to list all $_SERVER variables and the username ones no longer appear.

I also installed v5 on my WinXP PC and get the same result.

Is this a 'feature' with PHP5 and is there a workaround?

This is perhaps an old thread, but I try anuway. Did you get this to work?
I have tried to get windows usernamne wihtout any success.
I a'm using Apache 2.2.6 and php5.

Can someone tell what all I need to do if I wan´t to retrieve windows username?

barand
10-30-2007, 07:40 AM
This is perhaps an old thread, but I try anuway. Did you get this to work?


Yes, see my second post.

I'm still not sure if the "\\" issue is php, iis, server OS as all were different versions. I just look for \\ or \

Kenne76
10-30-2007, 08:07 AM
But it doesn't help because I use Apache instead of IIS. Does anyone knows
how it is done with Apache?

barand
10-30-2007, 08:23 AM
I found this via Google

http://modntlm.sourceforge.net/

Kenne76
10-30-2007, 11:22 AM
I forgot also tell you that Apache 2.2.6 and php5 are running under Windows XP.
Does how this is done under Windows?

bradgrafelman
11-01-2007, 12:36 PM
Did you visit the link and read the information? There's a link for a Windows module.