全新安装 IIS 和 PHP 时出现 500 错误

ale*_*567 33 iis php

尝试在 Windows Server 2012 和 IIS 上运行 PHP 文件时,我不断收到 500 错误。我找不到任何详细的日志或任何东西。但是,当转到 IIS 的 PHP 管理器并单击检查配置时,出现以下错误:

Detailed Error Information:
Module    FastCgiModule 
Notification    ExecuteRequestHandler 
Handler    PHP55_via_FastCGI 
Error Code    0xc0000135 
Requested URL    http://domain.com:80/brkld3ip.php 
Physical Path    drive:\sites\domain.com\brkld3ip.php 
Logon Method    Anonymous 
Logon User    Anonymous 
Run Code Online (Sandbox Code Playgroud)

我在全新安装的 Windows Server 上使用 Microsoft Web Platform Installer 5.0 安装了 PHP。

我是来自 Linux 的 IIS 新手。所以我在 IIS 中“学习”得还不够多,无法知道发生了什么。我已经尝试按照几个网站的建议更新 C++ 可再发行 2012 更新 4。有人有其他想法吗?

编辑:我检查的另一件事是内存限制。一个站点建议我的内存限制需要提高。没变。

编辑:问题:是否必须重新启动 Windows 才能使 PHP 更改生效?

Kev*_*Kev 53

您很可能缺少与您正在运行的 PHP 版本对应的正确 VC++ 运行时。

如果您运行的是 PHP 5.5.x,则需要确保安装了 VC++11 运行时:

http://www.microsoft.com/en-us/download/details.aspx?id=30679

确保您下载并安装 x86 版本 ( vcredist_x86.exe),Windows 上的 PHP 还不是 64 位。

如果您运行的是 PHP 5.4.x,那么您需要安装 VC++9 运行时:

http://www.microsoft.com/en-us/download/details.aspx?id=5582

  • 对于 **PHP 5.6** 遇到此问题的任何人,您需要 **x86** 版本的 **Visual C++ Redistributable for Visual Studio 2012 Update 4** *(vcredist_x86.exe)*,可以从以下页面:https://www.microsoft.com/en-us/download/details.aspx?id=30679 (5认同)
  • 谢谢!PHP 5.6 实例需要 VC++ 11 (VS 2012) 运行时 (2认同)

小智 6

我被一个类似的消息抓住了,结果我没有安装 CGI 服务器角色(在 IIS -> 应用程序开发下)。