Partner and Community Forums
Fix for PHP 5.3 IIS 7 500 Internal Server Error The FastCGI process e...
Last post Apr 17, 2015 05:40 AM by JGdL
Jul 26, 2009 10:20 PM|blazingbiz|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
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
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.
500 Internal Server Error
Web Server Enhancement
Windows 2008 Server
Web Host Application
Aug 10, 2009 11:31 AM|senp|LINK
I am getting error code of 0x000000ff.
Is it because that I have installed threaded version instead of Non-threaded version?
Aug 10, 2009 04:20 PM|blazingbiz|LINK
I think that may be the case, set up the non-threaded one and see what happens.
Aug 10, 2009 06:04 PM|senp|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?
Aug 10, 2009 10:16 PM|blazingbiz|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?
Aug 25, 2009 02:40 AM|blazingbiz|LINK
Did you fix your PHP 5.3 issue on Windows 2008 server on 64-bit?
Sep 28, 2009 03:10 AM|Halinab|LINK
I too am getting this error runing windows iis7.0 on 64bbit tried the fix but still get the error
Sep 28, 2009 10:14 AM|don.raman|LINK
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.
Sep 28, 2009 10:19 AM|don.raman|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.
Feb 08, 2010 10:42 AM|SunboX|LINK
i´ve installed Php 5.2.11 using WEB PI. Now, how do i updrade to Php 5.3 ?
Feb 08, 2010 11:00 AM|don.raman|LINK
Please follow my blog at
Feb 08, 2010 04:21 PM|blazingbiz|LINK
Also check out this tutorial if you run into trouble, it lists the steps of the manual install of PHP 5.3 on a Windows 2008 IIS 7 environment so you know where to look if something goes wrong and how to walk through each step and find out where the PHP components
are in the Windows 2008 operating system and web server -
How to install PHP 5.3 on the IIS Windows 2008 Server Platform - if you find anything missing please add it to the comments and it'll be added to the tutorial, it's an on going log and guide for people to use and make better with their own PHP 5.3 on Windows
Web Server 2008 install experience.
Mar 16, 2010 11:25 PM|cchance|LINK
Mar 17, 2010 02:20 AM|don.raman|LINK
Please let us know details about how are you concluding that Wordpress is crashing in FastCGI mode and please share details about the crash. You can use ADPLUS as described at
http://support.microsoft.com/kb/286350 to troubleshoot hangs and crashes further.
Apr 12, 2010 02:46 AM|davros1973|LINK
I had a problem with php 5.3.2 and iis7 on windows server 2008 32-bit (on vmware vm) and mysql 5.? and Wordpress 2.9.2. I've had the vm working fine for over a year, with a previous version of wordpress and php, and also using imagick, joomla, and my own
I couldn't install at all - getting 500 error, no php errors in the php error log, and a failed request trace saying about a FCGI process that exited normally.
Turned-out I spelled the name of my mysql database incorrectly! Weird how it resulted in such an error though?
I'm saying this, because I wonder if intermittent errors could be to do with script-timeouts vs database response time-outs etc? Incidentally I've had problems with openbasedir not doing expected things in the past too - I've had to change my design to
accomodate it though I've always needed it as my application pools use user accounts and so I need to be able to use those user-account temporary-file locations preferably. And I like to isolate sites and access to them. Also I had previously come accross
a problem with using "localhost" in a database connector for mysqli after upgrading to php5.3.2 - something to do with localhost resulting in getting the (first) IPV6 address rather than the IPV4 one (part of a mysql process?) from the windows hosts file.
I had to change to 127.0.0.1
Don't know if my blunderings/observations are of any help to anyone.
May 25, 2010 03:36 AM|alfonsopilato|LINK
From experience here's what i've found out :
IIS will return a generic Internal Server Error 500 if it doesn't have any more specific error from the application, in this case PHP/FastCGI.
To provide IIS with all necessary php error information and NOT display the generic Internal Server Error, do the following to your php.ini file:
log_errors = off
To ensure PHP error messages do make it to the web page do this:
display_errors = on
The level of PHP error reporting can be controlled by (more about this at
error_reporting = E_ALL & ~E_NOTICE
From all of this we can now easily understand how a simple date.timezone unset parameter can end up as an Inernal Server Error 500 on a web page. Normally if you don't set this parameter, PHP would want to report:
Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning,
you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for '-7.0/DST' instead in C:\inetpub\wwwroot\info.php on line 3
and since it could not report it (because of log_errors = on)
IIS has instead returned the generic Internal Server Error message.
Therefore in summary:
I hope this helps somebody.Cheers!
Windows 2008 Server
internal server error 500
May 25, 2010 11:30 AM|don.raman|LINK
Turning display_errors to On seems like a good idea on a development server. But turning this directive 'On' on a production server can expose some error messages to the client which may be dangerous.
I believe the best way is to configure below directives in php.ini.
error_reporting can be kept to E_ALL or whatever one wants. Also ensure that your web server has sufficient permission to write to the file specified by error_log INI directive.
This will ensure that whenever there is a PHP error it gets logged into the file pointed by error_log at the server side and so only administrator has access to it.
All this suggested settings are automatically done by installing PHP from Microsoft Web platform Installer. Unfortunately WPI doesn't support PHP5.3 (but supports installation of PHP5.2.13 as of now) but we are working on it.
Mar 09, 2011 04:38 AM|nadimattari|LINK
Locally i have a Windows Web Server 2008 machine on which I have installed IIS7, PHP5.3, etc (using Windows Web Platform Installer –
http://www.microsoft.com/web/downloads/platform.aspx). When I test a PHP file in which there is only phpinfo() it works fine. When I try to include files from within my php files (using include(), require(), etc), I get the HTTP 500 Internal error. After
trying several recommendations from forums (like this one), i’ve find a solution.
I’ve downloaded PHP5.3.5 from
http://www.blumentals.net/download/php.php and replaced the contents of the existing PHP (installed using Windows Web Platform Installer) with this one. Problem solved.
Jan 30, 2012 09:26 AM|HCamper|LINK
The PHP 5.3.5 version listed and IIS 7 Server.
Please update to a more recent version PHP 5.3.9 release install
Mar 07, 2012 09:04 AM|globalweb9|LINK
Thanks for the post - helped alot!
I just wanted to add one additional note here for those trying to get PHP to run on Server 2008 R2 (64bit) - make sure you install the 32bit version of the Microsoft Visual 2008 C++ Runtime. We tried it with the 64bit version of the Runtime, and still got
500 errors. The 32bit version of this solved our issues.
Mar 07, 2012 09:08 AM|GlobalWebAdmin|LINK
Upon installing the PHP 5.3, I did not realize that my run-time version for Visual C++ was the 64bit version. I installed the 32 bit version and the problem is fixed!!! This... along with the steps from the PHP.net "Manual Install Steps" were followed exactly
as documented and PHP runs fine.
Mar 23, 2012 04:53 PM|cesmendez|LINK
Mar 27, 2012 11:32 AM|globalweb9|LINK
I installed the 32 bit in addition to keeping the 64 bit intact and all seems to work fine
May 31, 2012 11:52 PM|ENetArch|LINK
Jan 31, 2013 06:23 PM|colin.wiseman|LINK
FWIW : I had similar issues just recently. But solved it with a very simple fix. I changed the Error Pages of IIS of the website you are working with to point to /index.php instead. It looks like WordPress picks up the error when IIS redirects the error
the index.php page and then re-redirects the user to the correct install pages.
My story on this : http://you.arenot.me/2013/01/31/wordpress-new-install-on-windows-iis-7-with-500-internal-server-error/
May 09, 2013 04:00 AM|MM33|LINK
I found this article in error looking for a similar issue, getting IIS7 to report errors at all, rather than the standard '500 ISE' - Later I stumbled across a very useful snippet of information below, in regards to custom error handlers, and how to configure
Turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.
You can do this from the IIS7 Admin tool by running “Start>Run>inetmgr.exe”, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting
Apr 17, 2015 05:40 AM|JGdL|LINK
I've dealing with this problem for months.
I'm using an stable 5.4 or so version of PHP. And I am not able to make work a later version anymore.
Sometimes I put hours on it, trying to understand it at all. And I can tell you some clues for solving it, depending on each case.
The php.ini used must be the correct one.
Pay attention to the PHPRC enviroment var assigned with the SET Dos command. It must contain the path to the php.ini file you use. In my case, I was allways using the sameone.
Everyone recommends to use the 32 bit php version. And 32bits C++ also.
After these and checking the php.ini at last, php.exe and php-cgi.exe stoped reporting errors when executed at the DOS command window. But the fast-cgi error still happens at the browser window.
I found a good info about a question of numbers. The matter seems to be about 64bits vs 32bits thing. I think that somewhere there must be a problem between software versions that I've not found. Something is working in 32bits and other one in 64bits mode.
I've got an error number like 0xFFFFFFFFF or so, and I read over there that a bad configuration of 32bits enviroments do a bug with big integer numbers.
I give up for now. I have no time for more tests.
If someone can give me an idea it would be fine. Thanks.
I hope it helps to you too.