Getting blank value for $_SERVER['AUTH_USER']

后端 未结 3 1936
星月不相逢
星月不相逢 2021-02-20 11:59

I have a PHP app running on Windows 2008 server R2, which authenticates users against Active Directory using PHP\'s LDAP library.

As per this answer, I\'m looking to use

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-20 12:30

    I got it working by disabling Anonymous Authentication in IIS, and enabling Windows Authentication (I thought Windows Authentication was already enabled, but it turns out the role was simply installed.) Now $_SERVER['AUTH_USER'] and $_SERVER['REMOTE_USER'] are populated.

提交回复
热议问题