PHP Error | HTTP Error 500.0 – Internal Server Error | C:\Program Files\PHP\vX.0\php-cgi.exe – The FastCGI process exited unexpectedly

After installing PHP on your IIS,  you might be stuck with the following error :

Http Error 500.0 FastCGI process exited unexpectedly. ”

This error occurs when the Visual C++ Redistributable file to handle CGI process is not present in the system.

To resolve this issue you just need to install proper VC++ redistributable file.

So if you are facing this issue, and if the system does not have proper VC++ version, then just install the version of VC++ supported by the PHP version installed on your system to resolve this error.

List of PHP versions and the VC++ versions supported by it:

PHP version MVC version Supported VC++ version
PHP 7.0 VC 14 Build VC ++ 2015
PHP 5.6 VC 11 Build VC ++ 2012 / update4
PHP 5.5 VC 11 Build VC ++ 2012 / update4
PHP 5.3 VC 9 Build VC ++ 2008

So happy troubleshooting folks . 😉

Enabling PHP ImageMagick extension with IIS !


IIS 8.5 Installed

PHP 7.0.X ( 64 Bit) installed to C:\Program Files\PHP via WPI.

O.S :-  Windows Server 2012 / R2

We are about to  enable PHP ImageMagick extension with IIS

ImageMagick is free Open source software for displaying, editing image files in an easier way. It supports more than 200 image formats.

Step 1. Download ImageMagick

Go to and download ImageMagic exe file.

Step2. Installing of ImageMagick exe

Run the setup file (ImageMagick-6.9.3-7-Q16-x64-dll.exe ) .

Click I accept the agreement button & Click Next.



In the next window, click next and move on. You will be asked about the installation location.



It is recommend to change the default path ( C:\Program Files\ImageMagic x.x.x\ ) to any other folder in C drive. Otherwise it may not work properly.

Here I have created a folder call ‘IM’  in C drive &  is going to install ImageMagick into that folder.  Click Next after selecting the path.

Do not change the Options in the next window ( Select Additional Tasks). Leave it as default & click Next,




Click install in the next page and finish the installation.

Step 3 :- Adding proper DLL files into PHP extension folder.

Go to and Download the proper DLL files forPHP.

From PHP 7.0.0, it supports 64-bit architecture. To find if your PHP is 64- bit or not, open PHP info window and search for Architecture.

Also it will be Thread safe OR Non-Thread safe. We can use phpinfo for this one too. Check for thread safety in phpinfo window, If thread safety is disabled then your PHP is Non-Thread safe.

Once you determine the correct PHP Type, download the appropriate dll files from the above mentioned link. Copy and paste it to PHP extension folder. ( In default – C:\Programfiles OR Program Files (x86) \PHP\v7.0\ext )

Once completed, restart your web server.  

After restarting, open IIS manager and look for PHP Manager in it. Double click on PHP Manager and open it. Then in right pan you can see a new window called PHP Setup.

If you are opening  PHP manager for the first time, then you will see a message. ( red circle in the following image )  . Click on that and enable all.



Then click on  ‘Enable OR Disable Extension’ tab and find for php_imagick.dll . Click on it then click Enable button in the right side panel to enable  ImageMagic Extension.




Once enabled, restart IIS.

Once completed, open phpinfo page. You will be able to see that imagick module is added with php.