The FastCGI process exited unexpectedly

I am trying to run PHP via FastCGI on a Windows 2008 server.

I followed this installation doc and have checked I completed the steps correclty numerous times.

However when I try to execute a php page i am presented with the following error:

HTTP Error 500.0 - Internal Server Error C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

2

17 Answers

maybe you should try installing VC++ runtime as explained here.

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:

5

When you run php-cgi.exe from the dos command line, you will get the missing MSVCR110.dll pop up message.

Like Ben said, Get the x86 download for the dll here:

5

After much pain and suffering, turns out I needed to install the "Visual C++ Redistributable for Visual Studio 2012 Update 4 32-bit version", even on my 64-bit server.

4

If you are installing PHP 7.1.14 on windows server 2008 rc2 Enterprise, only thing worked for me is to install microsoft Visual C++ 2015 Redistributable Update 3 from

2

You might be using C:/[your-php-directory]/php.exe in Handler mapping of IIS just change it C:/[your-php-directory]/php-cgi.exe.

2

I tried opening php-cgi.exe directly and it gave me a more clear error message.

As the answer of 'sepehr' this issues are because of VC++ Redistributable suitable version for PHP are not installed or need to be reinstalled again.

I faced it before so i'll explain my steps to fix it.

1- Each PHP version is built by a specific Visual C++ Redistributable version like (10, 11,12,14,..) what ever. ((How you know!! look.. ))

  • Check back enter link description here The PHP Site then at the left side of this page, look at "Which version do I choose?" then see what version of VC++ is fits your PHP version installed.

  • Now YOU HAVE TO Download both of VC++ 32 and 64. and if your PC has it already then Unistall them first. and then install what you downloaded recently bu (first 32 then 64).

- VC download links are exists on the mentioned PHP Site on the left side also.

I hope it helps you.

1

if you have two application like (your app, phpmyadmin) just disable APC extension Hope that fix that issue it's worked with me

For user using PHP 5.6.x follow this link and install the x86 version.

I have installed the latest version of Visual C++ Redistributable from this link for php 8.0.0 x86:

and my problem was solved.

In my case the problem was coming through the application pool. Try to change your application pool ASP.NET v4.0.

In my case I had wrong constellation of configurations:

  • error reporting disabled
  • typo error in the configuration

After enabling the error_reporting it was clear the session_path was pointed to a wrong folder.

"Sad but true"

I was getting this same error installing PHP 7 on Windows Server 2008 R2. I resolved this by installing the Visual C++ Redistributable for Visual Studio 2015.

1

For Issue C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly.

I resolved this by installing the Visual C++ Redistributable for Visual Studio 2015.(Microsoft Visual C++ 2015 Redistributable Update 3) and Visual C++ Redistributable for Visual Studio 2012 Update 4 in 32 and 64bit versions. and also make sure in php.info file cgi.fix_pathinfo=0 enabled.

I got this error too after I changing PHP version in windows. I have PHP Manager plug in of IIS installed, it show the PHP is not enabled, then I fix this issue after doing "Register new PHP version" enter image description here

I struggled for hours with that problem, and no solution worked for me. May seems obvious or very foolish, but my error was in PHP 5.6 version. I was using PHP 5.6 from XAMPP, but if you download PHP on IIS with Web PI (Microsoft Web Platform Installer) it's more suitable for IIS instead XAMPP version.

More Info:

Running php-cgi.exe from the command line gave a message like the vcrt dll is a lower version than what is linked in php. Using Visual C++ redistributable package 64 bit 14.29 solved the above problem for me.

You Might Also Like