IIS 7.5 PHP 失败“FastCGI 进程意外退出”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11992153/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
IIS 7.5 PHP failure "The FastCGI process exited unexpectedly"
提问by Vilid
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
错误代码 0x00000000
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\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.
我已经根据 IIS 的需要修改了 PHP.ini 文件,并将其切换到详细模式。C:\inetpub\logs\FailedReqLogs 中没有任何日志文件,生成的其他日志文件中也没有与此错误相关的文件。
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.ini 设置 fastCGI 以在 IIS 中使用 PHP(配置它以加载 php.exe) 尝试使用 WinCache 作为执行方法。
回答by b01
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++ Redistributable
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.
当我的网页在升级后不再加载时,我发现通过从控制台运行 php --version ,我需要这个 DLL。然后显示我需要 MSVCR110.dll,它随 MS 的 32 位 VS 可再发行更新提供。由于我在 Window Update 中关闭了可选更新,因此我没有自动获得它。
They also come in different flavors (32-bit, 64-bit, and ARM) 32-bit is what worked for me.
它们也有不同的风格(32 位、64 位和 ARM) 32 位对我有用。
回答by piris
Install the 32 bit of Visual C++ Redistributable for Visual Studio 2012 Update 4
安装 32 位Visual C++ Redistributable for Visual Studio 2012 Update 4
NOT the 64 bit
不是 64 位
回答by A23149577
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.ini 文件中的每个扩展名,看看错误是否存在。
[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 中添加为扩展
回答by seb835
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!
希望有帮助!
回答by Donald H.
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 不起作用,注释掉整行。
回答by Pacsal
I had this problem when I was configuring PHP 5.4.17(32-bit).
我在配置的时候遇到了这个问题PHP 5.4.17(32-bit)。
To fix it I had to install the Visual C++ Redistributablefor Visual Studio 2012 Update 4and it worked fine after installing this update.
为了修复它,我必须安装Visual C++ RedistributableforVisual Studio 2012 Update 4并且在安装此更新后它运行良好。
回答by Basel AlkKaddoumi
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
回答by LuisG
I have the same problem, which I fixed by installing the 32bit of Visual C++, redistributable for Visual Studio 2012. 64 bit doesn't work for me.
我有同样的问题,我通过安装32位的 Visual C++解决了这个问题,可重新分发给 Visual Studio 2012。64 位对我不起作用。
回答by Mohamed Abulnasr
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++ Redistributable 版本 (11,12,14,..)
so first is to check back your PHP version with the notes on the left side of php site:
PHP Download pagesearch 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- 您必须同时下载 VC 32 和 64。并检查您的 PC 是否已经安装,以便卸载它们(仅适用于同一版本)。然后先安装 32,然后安装 64。(除非它要求,否则不需要任何重新启动)。
3- Complete the php installation other steps for iis, apache or ....
3- 完成 iis、apache 或...的 php 安装其他步骤。
I hope it helps you.
我希望它能帮助你。

