IIS6 + PHP + FastCGI 500 Errors – Where to start looking?-Collection of common programming errors
I’ve set up IIS6 with FastCGI to use php-cgi.exe.
I have some php websites by external parties, that I’m trying to run in a test environment.
One of the websites just plain gives me a FastCGI Error Page. This does not happen on every page, it just seems to happen on some pages, while others are displayed correctly.
- Question: Is there some way to enable logging somewhere so that I can get a bit more information on this problem?
I have looked in
- Eventlog
- IIS Website log (c:\windows\system32\Logfiles)
- PHP log
But no results, except the IIS Website log mentions a return of a 500 page.
- Question: Is there any other way to debug/check where things might be going wrong?
Here is what the page looks like:
FastCGI Error
The FastCGI Handler was unable to process the request. Error Details:
The FastCGI process exited unexpectedly Error Number: -1073741571 (0xc00000fd). Error Description: Unknown Error HTTP Error 500 – Server Error. Internet Information Services (IIS)
Answer
Apparently, the error message means Stack Overflow, so debugging is the message. I’m not a PHP developer, so this was a pretty painful process. However we narrowed down the problem to an Ajax request, but I guess this could be happening with any sort of request:
The request itself causes the server to return a 500. After trying out the request with Fiddler, we found that Cookie entry in the GET request contains a PHPSESSID item. When leaving this out, the request does work.
So the answer to this problem (in our case) is leaving out the PHPSESSID from the request. Now all that’s left is figuring out how to do that 🙂
-
The error code
-1073741571 (0xc00000fd)
means Stack Overflow. You will need to debug your code. -
Try search at http://forums.iis.net. They seem to suggest that you try upgrade PHP, or there is a problem with the application that causes PHP or the fastCGI process to crash.
Good luck.
-
For those who are looking for an answer for this, i spent about two hours in a “500 internal server error” + PHP + fast CGI and the error was that a web.config file was at my PHP Application folder (IIS has created one automatically).
By deleting the file the application has worked sucessfully.
Originally posted 2013-08-11 02:47:16.