500 error on fresh install of IIS and PHP

Solution 1:

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:

http://www.microsoft.com/en-us/download/details.aspx?id=30679

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:

http://www.microsoft.com/en-us/download/details.aspx?id=5582

Solution 2:

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).


Solution 3:

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.

Tags:

Php

Iis