Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When attempting to run a PHP file on Windows server 2012 and IIS, I keep getting a 500 error. I cannot find any detailed logs or anything. However, when going to PHP Manager for IIS and click check config, I get the following error:

Detailed Error Information:
Module    FastCgiModule 
Notification    ExecuteRequestHandler 
Handler    PHP55_via_FastCGI 
Error Code    0xc0000135 
Requested URL 
Physical Path    drive:\sites\\brkld3ip.php 
Logon Method    Anonymous 
Logon User    Anonymous 

I installed PHP using Microsoft Web Platform Installer 5.0 on a fresh install of Windows Server.

I am new to IIS coming from Linux. So I am not "learned" enough in IIS to know what's going on. I have tried updating C++ redistributable 2012 update 4 as a couple websites suggest. Anybody have any other ideas?

EDIT: Another thing I checked was memory limit. One site suggested my memory limit needed to be upped. No change.

EDIT: Question: Does Windows have to be rebooted for PHP changes to take effect?

share|improve this question
Which version of PHP? – Kev Jul 20 '14 at 5:22
Well when i installed php 5.5 with that Microsoft installer it also installed 5.3. – alexander7567 Jul 20 '14 at 12:47
up vote 25 down vote accepted

There's a fairly good chance you're missing the correct VC++ runtime for the version of PHP you're running.

If you're running PHP 5.5.x you need to ensure the VC++11 runtime is installed:

Make sure you download and install the x86 version (vcredist_x86.exe), PHP on Windows isn't 64 bit yet.

If you're running PHP 5.4.x then you need to install the VC++9 runtime:

share|improve this answer
You was correct. I already did the x64 since it was a 64 bit machine. Installed the x86 and instantly (no reboot required) it started working. Thanks! I racked my brain for hours! – alexander7567 Jul 20 '14 at 13:04
Thank you thank you thank you! – Mooseman Feb 12 '15 at 22:00
Brilliant! Fixed it immediately for me as well. +1 – Will Appleby Mar 25 '15 at 23:21
Thanks! PHP 5.6 instance requires VC++ 11 (VS 2012) runtimes – wchoward May 20 '15 at 16:22
For anyone having this issue with PHP 5.6, you need the x86 version of Visual C++ Redistributable for Visual Studio 2012 Update 4 (vcredist_x86.exe), which can be obtained from the following page: – derekmx271 May 12 at 22:17

I got caught out by a similar message, and it turned out that I had not installed the CGI Server Role (under IIS -> Application Development).

share|improve this answer
How similar is the message? – Deer Hunter Apr 6 '15 at 9:26
I installed the VC++ 11 runtime but I also had to install CGI support to get it working. On Windows 8.1 and IIS 8.5. Find it under Turn windows features on or off > Internet information services > application development features > CGI – jxmallett Jul 4 '15 at 3:42

I had the same error for PHP 7.0.3 on a 2012 R2 server with IIS 8.5.

The solution is to install: Visual C++ Redistributable for Visual Studio 2015 32bits

Everything worked properly after installing this.

share|improve this answer

Still had the 500 error after installing the Visual C++ Redistributable for Visual Studio 2015 32bits.

Ran procmon from microsoft sysinternals and when requesting my php web page found

w3wp.exe C:\PHP\php-cgi.exe "ACCESS DENIED"

w3wp.exe is the app pool running under IIS

Giving the specific app pool user READ/EXECUTE permissions to c:\php fixed the issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.