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:
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.
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.
PHPiis7IIS 7Wordpress500 Internal Server ErrorGuideFixWork AroundWeb Server EnhancementWindows 2008 ServerTutorialWeb Host Application
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?
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:
<div mce_keep="true">From where and how did you install PHP 5.3?</div>
<div mce_keep="true">Did you configure FastCGI properly?</div>
<div mce_keep="true">Did you ever install PHP on this machine? If yes, how and if this was using FastCGI or ISAPI?</div>
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.
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.
blazingbiz
37 Posts
Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Jul 27, 2009 02:20 AM|LINK
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.
PHP iis7 IIS 7 Wordpress 500 Internal Server Error Guide Fix Work Around Web Server Enhancement Windows 2008 Server Tutorial Web Host Application
senp
2 Posts
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Aug 10, 2009 03:31 PM|LINK
I am getting error code of 0x000000ff.
Is it because that I have installed threaded version instead of Non-threaded version?
blazingbiz
37 Posts
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Aug 10, 2009 08:20 PM|LINK
I think that may be the case, set up the non-threaded one and see what happens.
senp
2 Posts
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Aug 10, 2009 10:04 PM|LINK
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?
blazingbiz
37 Posts
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Aug 11, 2009 02:16 AM|LINK
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?
blazingbiz
37 Posts
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Aug 25, 2009 06:40 AM|LINK
Did you fix your PHP 5.3 issue on Windows 2008 server on 64-bit?
PHP iis7 IIS 7 Wordpress 500 Internal Server Error Guide Fix Work Around Web Server Enhancement Windows 2008 Server Tutorial Web Host Application
Halinab
13 Posts
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Sep 28, 2009 07:10 AM|LINK
I too am getting this error runing windows iis7.0 on 64bbit tried the fix but still get the error
don.raman
1207 Posts
Microsoft
Moderator
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Sep 28, 2009 02:14 PM|LINK
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:
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.
don.raman
1207 Posts
Microsoft
Moderator
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Sep 28, 2009 02:19 PM|LINK
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.
SunboX
1 Post
Re: Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process exited unexpectedly
Feb 08, 2010 02:42 PM|LINK
Hi,
i´ve installed Php 5.2.11 using WEB PI. Now, how do i updrade to Php 5.3 ?
thx André