IIS 7.5 PHP failure “The FastCGI process exited un

2019-01-22 07:10发布

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.

9条回答
叛逆
2楼-- · 2019-01-22 07:40

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.

查看更多
我只想做你的唯一
3楼-- · 2019-01-22 07:40

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.

查看更多
一纸荒年 Trace。
4楼-- · 2019-01-22 07:43

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

查看更多
男人必须洒脱
5楼-- · 2019-01-22 07:46

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!

查看更多
小情绪 Triste *
6楼-- · 2019-01-22 07:49

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.

查看更多
Deceive 欺骗
7楼-- · 2019-01-22 07:51
登录 后发表回答