Is HTTP authentication possible with PHP on IIS FastCGI?

I just migrated from PHP 5.2.3 using php5isapi.dll to PHP 5.3.0 using FastCGI and php-cgi.exe. On this site, I have windows / ntlm / http authentication hooks that do something like this:

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.

This did a great job with PHP 5.2.3 with isapi. Now that I have switched to FastCGI on IIS6, it is broken. It works for me, but I have an administrator on the server. Those who do not have an administrator (most people) see the following option:

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.

?

+3
1

, .

  • : FastCGI Docs . FASTCGI 500 php.

  • , PHP/IIS/FastCGI ( C:\PHP\Session) , anon.

  • "" " " . , , ​​, , ...

0

Source: https://habr.com/ru/post/1715934/


All Articles