如何设置PHP_AUTH_USER [英] How to set PHP_AUTH_USER

查看:1004
本文介绍了如何设置PHP_AUTH_USER的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PHP_AUTH_USER是空的。
而使用Windows登录凭证制度。

PHP_AUTH_USER is empty. And system using the Windows login credentials.

我怎样才能改变它。

我想使用由用户输入的用户名和密码

I wanna use the username and password entered by the user

推荐答案

如果您正在IIS下运行PHP和使用Windows身份验证您768,16找到一个(或多个)下的用户名:

If you're running PHP under IIS and using Windows Authentication you shoud find the username under one (or more) of these:


  • $ _ SERVER ['LOGON_USER']

  • $ _ SERVER ['AUTH_USER']

  • $ _ SERVER ['REDIRECT_LOGON_USER']

  • $ _ ENV ['REDIRECT_LOGON_USER']

忘记密码 - PHP开始已授权用户在和脚本不应该需要它。

Forget about the password - when PHP starts the user has already been authorized and the script is not supposed to need it.

您可以使用Windows身份验证登录到SQL Server作为用户:看文件建立的<一个href=\"http://blogs.msdn.com/b/brian_swan/archive/2010/02/10/sql-server-driver-for-php-understanding-windows-authentication.aspx\"相对=nofollow> fastcgi.impersonate 。这只要IIS和SQL Server是在同一系统上工作。如果你把你的数据库别处......好吧,你可以用google搜索的双跳问题如果您希望血淋淋的细节,但短期的故事是,这是行不通的。我已经失去了一个月的等待客户放弃,让一个普通的用户名/密码登录到自己的数据库中。

You can use Windows Authentication to log into SQL server as the user: look at the documentaion for fastcgi.impersonate. This works as long as IIS and SQL Server are on the same system. If you keep your database elsewhere... well, you may google for Double Hop issue if you want the gory details, but the short story is that it doesn't work. I've lost a month waiting for a customer to give up and allow a plain user/pass login into his database.

这篇关于如何设置PHP_AUTH_USER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆