« Previous Next »

Not Answered Thread: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

Last post 09-28-2009 10:19 AM by don.raman. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 07-26-2009, 10:20 PM

    Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

    This post is to help anyone who is having 500 Internal Server Errors with their install of PHP 5.3 on IIS 7 in the Windows 2008 Server environment. I just spent a few hours troubleshooting this and I hope I can help save more hours of the same for others. I looked this up and found a lot of false leads then I came up with a solution which fixes this for me on my server, so I'll list it all here and hopefully people can add to it if I miss anything. Also if my fix falls apart after a while I can post it back here and see if we can all go back and review the steps and at least have a list of what works and what doesn't work.

    So this is how it started for me: I just installed PHP 5.3 on my production server Windows 2008 32-bit, I got the download msi installer from http://windows.php.net/download/ the VC9 Non-Thread safe version.

    I set everything up with the php.ini fine and it worked fine. But after about an hour using WordPress 2.8.2 I kept getting 500 Internal Server Errors and the detailed description from the server Browser says:

    The FastCGI process exited unexpectedly

    Module FastCgiModule
    Notification ExecuteRequestHandler
    Handler PHP_via_FastCGI
    Error Code 0xc0000005

    I tried all the usual fixes, I set the error_reporting = E_ALL & ~E_DEPRECATED

    I also set the date.timezone ="America/Los_Angeles" - don't know if the quotes matter

    I also read that setting Write permission for the Anonymous Identity on the wp-content folder fixed this issue but I did that and it does not fix the issue.

    Ironically I was doing all of this while creating a write up to install PHP 5.3 on the IIS 7 Windows 2008 Server Platform so I was testing it out on my server as I wrote it.

    I followed my instructions and it worked fine but then about every three clicks I got the 500 Internal Server Error.

    The odd thing is that if I click the refresh button the page pops up fine without any error, then I can go on for about three or so clicks and I'll get the 500 Internal Error again. Same thing on the Server with the detailed error page, if I click refresh then it's fine for a few more clicks then it happens again.

    Then finally I removed the open_basedir = directive for each of my custom PHP web site paths and it worked fine with no more 500 Internal Server Error, and that is what I can report is the fix.

    My next guess would have been giving more Memory than the 16 MB allotted via the "more secure" php settings.

    There was some fussing around with the Server Handler Mapping and having quotes on it for the Program Files section of the file path to the php-cgi.exe and I set the FastCGI Module to check for the php being a "File or Folder" in the FastCGI settings so I don't know if this helps but just to be complete with my steps I'm including it.

    Getting rid of the open_basedir did it for me though, so I hope that helps. If people have issues and want to list what they did or are doing to fix it and if any of what is listed here helps please post a reply and I'll try to keep up with it as much as I can.

    Oh and my last point, I was going to stop troubleshooting this, I have a lot of work to do and I was well beyond the "screw it" point, but being a programmer you know that you just can't walk away when the little bugger machines start acting up.

    I was about to uninstall PHP 5.3 and go back to what worked - PHP 5.2.9 - but I'm glad I stuck it through, the speed and enhancements from PHP 5.3 are noticeable. If you are frustrated with this, just stick through with this guide and see if we can get others to add to it and have a comprehensive list of issues and fixes for it, PHP 5.3 is really nice and well worth it. After looking at all the Bug reports and angry posts online about PHP 5.3 I just want to get it across that the improvements are worth fixing what ever is bugging the "New" "Just Released" thing, this is the typical hair pulling that comes with the bleeding edge latest and greatest early adopter crowd of anything.

    Thanks.

  • 08-10-2009, 11:31 AM In reply to

    • senp
    • Not Ranked
    • Joined on 08-10-2009, 3:28 PM
    • Posts 2

    Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

     I am getting error code of 0x000000ff.

    Is it because that I have installed threaded version instead of Non-threaded version?

  • 08-10-2009, 4:20 PM In reply to

    Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

     I think that may be the case, set up the non-threaded one and see what happens.

  • 08-10-2009, 6:04 PM In reply to

    • senp
    • Not Ranked
    • Joined on 08-10-2009, 3:28 PM
    • Posts 2

    Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

     I changed to non-threaded version. It is still throwing error. can't trace the issue. I am using W2k8 64bit. do I have to run script for 32bit?

  • 08-10-2009, 10:16 PM In reply to

    Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

     Yes do that, I've seen some posts talking about 64-bit also make a list of all the steps you are taking in your PHP install, did you completely uninstall a previous version of PHP?

  • 08-25-2009, 2:40 AM In reply to

    Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

     Did you fix your PHP 5.3 issue on Windows 2008 server on 64-bit?

  • 09-28-2009, 3:10 AM In reply to

    • Halinab
    • Top 500 Contributor
    • Joined on 10-01-2005, 1:02 PM
    • Posts 13

    Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

     I too am getting this error runing windows iis7.0 on 64bbit tried the fix but still get the error

  • 09-28-2009, 10:14 AM In reply to

    Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

    Hi Halinab,

    500 is an internal server error and the message implies that FastCGI called something like ExitProcess. There can be many reasons for this. Can you tell more details please. Specifically I would like to know:

    • From where and how did you install PHP 5.3?
    • Did you configure FastCGI properly?
    • Did you ever install PHP on this machine? If yes, how and if this was using FastCGI or ISAPI?

    I would advise if you have to setup PHP environement the best bet will be to use Microsoft Web Platform Installer which can be found at http://www.microsoft.com/web/downloads/platform.aspx. It is simple to use and takes care of installing all the dependencies.

    Thanks,

    Don.

  • 09-28-2009, 10:19 AM In reply to

    Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly

    One more thing I forgot to add. Microsoft Web Product Installer will install PHP5.2.11. However this will ensure that your other environment and depencies are installed correctly. Once you have 5.2.11 running let me know, I will tell you how to upgrade to 5.3. Currently WEBPI doesn't offer 5.3.

    Thanks,

    Don.

Page 1 of 1 (9 items)
Microsoft Communities