IIS 7.5 PHP失败“FastCGI进程意外退出”

时间:2022-10-27 22:38:46

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:

我一直试图让PHP与IIS 7.5一起工作,并且遇到了一些障碍。每当我试图加载页面时,我得到以下错误:

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

“HTTP错误500.0 - C:\Program Files\PHP\php.内部服务器错误exe - FastCGI进程意外退出"

Module FastCgiModule

模块FastCgiModule

Notification ExecuteRequestHandler

通知ExecuteRequestHandler

Handler PHP_via_FastCGI

处理程序PHP_via_FastCGI

Error Code 0x00000000

错误代码0 x00000000

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

请求的URL http://localhost:80 / index . php

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

物理路径C:\ inetpub \ wwwroot \ index . php

Logon Method Anonymous

匿名登录方法

Logon User Anonymous

登录用户匿名

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

请求跟踪日志目录C:\inetpub Log \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.

我已经修改了PHP。根据IIS使用所需的ini文件,并将其切换为详细模式。在C:\inetpub log \FailedReqLogs中没有日志fiel,在生成的其他日志文件中也没有与这个错误相关的日志文件。

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.

其中有一些细节是:重新检查PHP。在IIS中设置fastCGI来处理PHP(配置它来加载PHP .exe),尝试将WinCache作为执行方法。

9 个解决方案

#1


49  

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

当我将PHP 5.4.14升级到5.5.3(32位)时,我遇到了这个问题。

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

为了修复它,我必须安装Visual Studio 2012 Update 3的Visual c++重分发版

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.

当我的web页面在升级后不再被加载时,我通过运行控制台的php版本发现我需要这个DLL。然后我发现我需要MSVCR110。dll,来自ms的32位VS redistributable update,由于我在窗口更新中有可选更新被关闭,所以我没有自动获得它。

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

它们也有不同的风格(32位、64位和ARM) 32位对我很有用。

#2


9  

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

为Visual Studio 2012更新4安装32位的Visual c++再分发版

NOT the 64 bit

不是64位

#3


4  

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.

看起来在你的php中有一些dll扩展不能正常工作,迫使CGI关闭。尝试在php中注释每个扩展。查看是否存在错误。

[EDIT 1]

(编辑(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

经过一些努力之后,我发现IIS不是线程安全的web服务器,您希望在php中使用的所有IIS扩展都应该使用nts lib进行编译。如果使用线程安全库编译扩展并将其添加到IIS,则IIS将不会启动。在这种情况下,您的扩展在线程安全(我猜在apache中使用)中,不应该作为IIS中的扩展添加

#4


3  

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


1  

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

我知道这是一条老掉牙的线索,但有人可能会省去一些抨击。

In php.ini, changing

在php中。ini,改变

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

让enable_dl = Off不起作用,注释掉整行就行了。

#6


1  

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

我在配置PHP 5.4.17(32位)时遇到了这个问题。

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.

为了修复它,我必须安装Visual Studio 2012 Update 4的Visual c++ Redistributable,在安装了这个更新之后,它可以正常工作。

#7


0  

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

如果您有两个应用程序(您的应用程序,phpmyadmin),请禁用APC扩展,希望修复它与我一起工作的问题

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

如果不只是安装Microsoft visual c++ 86和64

#8


0  

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.

我也有同样的问题,我安装了32位Visual c++,为Visual Studio 2012重新分配。64位对我没用。

#9


0  

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

正如上面正确提到的,它与“Visual c++ Redistributable”相关,它没有安装或没有正确安装。

Depending on my expertise on this issue.

这取决于我在这个问题上的专业知识。

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

1-首先要注意,每个PHP版本都依赖于特定的Visual c++可重分发版本(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.

因此,首先要用PHP站点左边的注释来检查PHP版本:PHP下载页面搜索“我选择哪个版本?”然后看看需要哪个vc++版本。

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

2-你必须下载vc32和64。并且检查你的电脑是否已经有了它,这样就可以同时拥有它们(只有相同的版本)。然后先安装32,再安装64。(除非它要求,否则不需要重新开始。)

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

3 -完整的iis的php安装其他步骤,apache或....

I hope it helps you.

我希望它能帮助你。

#1


49  

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

当我将PHP 5.4.14升级到5.5.3(32位)时,我遇到了这个问题。

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

为了修复它,我必须安装Visual Studio 2012 Update 3的Visual c++重分发版

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.

当我的web页面在升级后不再被加载时,我通过运行控制台的php版本发现我需要这个DLL。然后我发现我需要MSVCR110。dll,来自ms的32位VS redistributable update,由于我在窗口更新中有可选更新被关闭,所以我没有自动获得它。

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

它们也有不同的风格(32位、64位和ARM) 32位对我很有用。

#2


9  

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

为Visual Studio 2012更新4安装32位的Visual c++再分发版

NOT the 64 bit

不是64位

#3


4  

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.

看起来在你的php中有一些dll扩展不能正常工作,迫使CGI关闭。尝试在php中注释每个扩展。查看是否存在错误。

[EDIT 1]

(编辑(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

经过一些努力之后,我发现IIS不是线程安全的web服务器,您希望在php中使用的所有IIS扩展都应该使用nts lib进行编译。如果使用线程安全库编译扩展并将其添加到IIS,则IIS将不会启动。在这种情况下,您的扩展在线程安全(我猜在apache中使用)中,不应该作为IIS中的扩展添加

#4


3  

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


1  

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

我知道这是一条老掉牙的线索,但有人可能会省去一些抨击。

In php.ini, changing

在php中。ini,改变

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

让enable_dl = Off不起作用,注释掉整行就行了。

#6


1  

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

我在配置PHP 5.4.17(32位)时遇到了这个问题。

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.

为了修复它,我必须安装Visual Studio 2012 Update 4的Visual c++ Redistributable,在安装了这个更新之后,它可以正常工作。

#7


0  

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

如果您有两个应用程序(您的应用程序,phpmyadmin),请禁用APC扩展,希望修复它与我一起工作的问题

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

如果不只是安装Microsoft visual c++ 86和64

#8


0  

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.

我也有同样的问题,我安装了32位Visual c++,为Visual Studio 2012重新分配。64位对我没用。

#9


0  

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

正如上面正确提到的,它与“Visual c++ Redistributable”相关,它没有安装或没有正确安装。

Depending on my expertise on this issue.

这取决于我在这个问题上的专业知识。

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

1-首先要注意,每个PHP版本都依赖于特定的Visual c++可重分发版本(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.

因此,首先要用PHP站点左边的注释来检查PHP版本:PHP下载页面搜索“我选择哪个版本?”然后看看需要哪个vc++版本。

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

2-你必须下载vc32和64。并且检查你的电脑是否已经有了它,这样就可以同时拥有它们(只有相同的版本)。然后先安装32,再安装64。(除非它要求,否则不需要重新开始。)

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

3 -完整的iis的php安装其他步骤,apache或....

I hope it helps you.

我希望它能帮助你。