为什么 PHP 在 IIS7 下不显示错误?

Why isn't PHP displaying errors under IIS7?

提问人:Kalessin 提问时间:2/10/2014 更新时间:2/10/2014 访问量:60

问:

运行从 Linux Apache 服务器迁移到 IIS 的脚本时,我得到一个空白页。

按照 SO 上其他地方的建议,我检查了是否正在加载正确的内容。从:php.iniphpinfo()

加载的配置文件C:\php\php.ini

在该文件中,我有以下内容:php.ini

  • error_reporting = E_ALL
  • display_errors = On
  • log_errors = On
  • error_log = "C:\Windows\Temp\php_errors.log"

为了更好地衡量,我还添加了

ini_set( 'display_errors', 1 );
error_reporting(E_ALL);

在脚本本身中。

我没有收到任何错误输出到屏幕,并且该文件不存在。C:\Windows\Temp\php_errors.log

我显然错过了一些东西;这是什么?:)

PHP IIS IIS-7 错误报告

评论

0赞 Ofir Baruch 2/10/2014
它能与web.config文件相关吗?我通常使用 linux 服务器,但我记得有一个案例,有人告诉我一些关于 web.config 文件的事情。
0赞 Kalessin 2/10/2014
@OfirBaruch:有问题的站点确实使用了 web.config 文件,但它没有引用任何错误报告。

答: 暂无答案