我刚刚从使用 php5isapi.dll 的 PHP 5.2.3 迁移到使用 FastCGI 和 php-cgi.exe 的 PHP 5.3.0。在这个站点上,我有一些用于 windows/ntlm/http 身份验证的钩子,如下所示:
if(empty($_SERVER["REMOTE_USER"]))
{
header("HTTP/1.1 401 Unauthorized");
exit;
}
$winuser = $_Server["REMOTE_USER"];
//parse $winuser to make sure it is on my domain, and can login to the site.
//set a cookie specifying that this user is logged in
//redirect to site.
这在带有 isapi 的 PHP 5.2.3 下工作得很好。现在我已经转移到 IIS6 上的 FastCGI,它坏了。它对我有用,但我在服务器上有管理员。没有管理员的人(大多数人)会看到以下一些变体:
FastCGI Error
The FastCGI Handler was unable to process the request.
________________________________________
Error Details:
• The FastCGI process exited unexpectedly
• Error Number: -1073741819 (0xc0000005).
• Error Description: Unknown Error
HTTP Error 500 - Server Error.
Internet Information Services (IIS)
我尝试过浏览文档和日志文件,但似乎没有取得任何进展。我实际上并不希望使用远程用户名来访问我的 .php 文件,我只想获取名称并与我的数据库匹配。anon 用户仍然应该是执行实际 php 的用户。
有什么线索吗?