-->

IIS 7.5 PHP failure “The FastCGI process exited un

2019-01-22 07:51发布

问题:

I've been attempting to get PHP working with IIS 7.5 and have hit a bit of a roadblock. Whenever I try to load the page I get the following error:

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

Module FastCgiModule

Notification ExecuteRequestHandler

Handler PHP_via_FastCGI

Error Code 0x00000000

Requested URL *http://localhost:80/index.php

Physical Path C:\inetpub\wwwroot\index.php

Logon Method Anonymous

Logon User Anonymous

Failed Request Tracing Log Directory C:\inetpub\logs\FailedReqLogFiles

I've modified the PHP.ini file as required for use with IIS, and have also switched it to verbose mode. There isn't any log fiel in C:\inetpub\logs\FailedReqLogs, and none related to this error in the other log files generated.

I've tried the other fixes I've found here and elsewhere but nothing's been successful so far.

In some detail these were: re-checking PHP.ini Setting up fastCGI to work with PHP in IIS (configuring it to load the php.exe) Trying WinCache as the execution method.

回答1:

I had this problem when I upgraded PHP 5.4.14 to 5.5.3 (32-bit).

To fix it I had to install the Visual C++ Redistributable for Visual Studio 2012 Update 3

I found out that I needed this DLL by running php --version from the console when my web pages no longer loaded after the upgrade. Which then revealed that I needed the MSVCR110.dll, that comes with the 32-bit VS redistributable update from MS. Since I have optional updates turned off in Window Update, I did not get it automatically.

They also come in different flavors (32-bit, 64-bit, and ARM) 32-bit is what worked for me.



回答2:

Install the 32 bit of Visual C++ Redistributable for Visual Studio 2012 Update 4

NOT the 64 bit



回答3:

It seems that there are some dll extension in your php which are not work properly and force the CGI closed. Try to comment every extensions in php.ini file and see whether the error will exist or not.

[EDIT 1]

After some struggles I found out that the IIS is non thread safe web server and all the extension which you want to use in php for IIS should used nts lib for compiling. If the extension compile with thread safe library and add to IIS the IIS would not start. In this case your extension in thread safe(used in apache I guess) and should not add as an extension in IIS



回答4:

Is this page you're trying to hit doing anything intensive?

I've had this problem before, and the error message was misleading.

You might want to try increasing your memory limit for that particular page. First find out the peak memory usage for that page:

echo memory_get_peak_usage(true);

Then set your memory limit appropriately:

ini_set("memory_limit","1024M");

Hope that helps!



回答5:

I know its an old thread, but someone might save some headbashing.

In php.ini, changing

; Whether or not to enable the dl() function.  The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
; http://php.net/enable-dl
enable_dl = Off

to

; Whether or not to enable the dl() function.  The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
; http://php.net/enable-dl
;enable_dl = Off

Having enable_dl = Off doesn't work, commenting out the entire line does.



回答6:

I had this problem when I was configuring PHP 5.4.17(32-bit).

To fix it I had to install the Visual C++ Redistributable for Visual Studio 2012 Update 4 and it worked fine after installing this update.



回答7:

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

if not just install Microsoft visual C ++ 86 and 64



回答8:

I have the same problem, which I fixed by installing the 32 bit of Visual C++, redistributable for Visual Studio 2012. 64 bit doesn't work for me.



回答9:

As mentioned correctly in above answers it's related to "Visual C++ Redistributable" that's not installed or not installed correctly.

Depending on my expertise on this issue.

1- First take care, each PHP version depends on specific Visual C++ Redistributable version (11,12,14,..)

so first is to check back your PHP version with the notes on the left side of php site:
PHP Download page search for "Which version do I choose?" then see what version of VC++ is required to you.

2- YOU HAVE TO Download VC 32 and 64 BOTH. and check if your PC has it already so Unistall both of them (for the same version only). and then install 32 first and 64 after. (no need for any restarts unless it asks).

3- Complete the php installation other steps for iis, apache or ....

I hope it helps you.