{"id":204,"date":"2022-08-30T14:57:27","date_gmt":"2022-08-30T14:57:27","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/08\/11\/iis6-php-fastcgi-500-errors-where-to-start-looking-collection-of-common-programming-errors\/"},"modified":"2022-08-30T14:57:27","modified_gmt":"2022-08-30T14:57:27","slug":"iis6-php-fastcgi-500-errors-where-to-start-looking-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/iis6-php-fastcgi-500-errors-where-to-start-looking-collection-of-common-programming-errors\/","title":{"rendered":"IIS6 + PHP + FastCGI 500 Errors &#8211; Where to start looking?-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve set up IIS6 with FastCGI to use php-cgi.exe.<\/p>\n<p>I have some php websites by external parties, that I&#8217;m trying to run in a test environment.<\/p>\n<p>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.<\/p>\n<ul>\n<li><strong>Question<\/strong>: Is there some way to enable logging somewhere so that I can get a bit more information on this problem?<\/li>\n<\/ul>\n<p>I have looked in<\/p>\n<ul>\n<li>Eventlog<\/li>\n<li>IIS Website log (c:\\windows\\system32\\Logfiles)<\/li>\n<li>PHP log<\/li>\n<\/ul>\n<p>But no results, except the IIS Website log mentions a return of a 500 page.<\/p>\n<ul>\n<li><strong>Question<\/strong>: Is there any other way to debug\/check where things might be going wrong?<\/li>\n<\/ul>\n<p>Here is what the page looks like:<\/p>\n<p>FastCGI Error<\/p>\n<p>The FastCGI Handler was unable to process the request. Error Details:<\/p>\n<p>The FastCGI process exited unexpectedly Error Number: -1073741571 (0xc00000fd). Error Description: Unknown Error HTTP Error 500 &#8211; Server Error. Internet Information Services (IIS)<\/p>\n<p><strong>Answer<\/strong><\/p>\n<p>Apparently, the error message means Stack Overflow, so debugging is the message. I&#8217;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:<\/p>\n<p>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.<\/p>\n<p>So the answer to this problem (in our case) is leaving out the PHPSESSID from the request. Now all that&#8217;s left is figuring out how to do that \ud83d\ude42<\/p>\n<ol>\n<li>\n<p>The error code <code>-1073741571 (0xc00000fd)<\/code> means Stack Overflow. You will need to debug your code.<\/p>\n<\/li>\n<li>\n<p>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.<\/p>\n<p>Good luck.<\/p>\n<\/li>\n<li>\n<p>For those who are looking for an answer for this, i spent about two hours in a &#8220;500 internal server error&#8221; + PHP + fast CGI and the error was that a web.config file was at my PHP Application folder (IIS has created one automatically).<\/p>\n<p>By deleting the file the application has worked sucessfully.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-08-11 02:47:16. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve set up IIS6 with FastCGI to use php-cgi.exe. I have some php websites by external parties, that I&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-204","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=204"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/204\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}