duanqianpu6499 2012-08-23 19:22
浏览 233
已采纳

获取$ _SERVER ['AUTH_USER']的空白值

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 $_SERVER['AUTH_USER'], but I'm getting a blank value for it. Same for AUTH_TYPE and AUTH_PASSWORD. The variables are declared, but none of them have any value assigned to them.

I've enabled both the Basic Authentication and Windows Authentication roles (through Server Manager), but neither has solved the issue.

I'm using PHP 5.3.14, Zend Server CE and IIS 7.5.

I need to apply a single sign on solution, but without being able to fetch the currently logged in user's credentials, I'm at a loss.

Any help would be greatly appreciated.

  • 写回答

3条回答 默认 最新

  • duandangqin0559 2012-08-23 21:23
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效