在 IIS7 集群上运行的 PHP 上调试 500 内部服务器错误

Debugging 500 Internal Server Error on PHP running on IIS7 cluster(在 IIS7 集群上运行的 PHP 上调试 500 内部服务器错误)
本文介绍了在 IIS7 集群上运行的 PHP 上调试 500 内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

最近我的 ISP 将我们的网站切换到 IIS7.0 高可用性集群.该网站在 PHP5.2.1 上运行,我只能上传文件(因此没有注册表调整).我之前测试过该网站,一切似乎都在运行,但现在结帐页面失败了:

<块引用>500内部服务器错误.您要查找的资源有问题,无法显示.

随着错误消息的出现,这不是很有用.我试过了:

ini_set('display_errors', 1);ini_set('error_log', $file_php_can_write_to );

但两者似乎都没有做任何事情.

有人知道如何获得更好的调试输出吗?

解决方案

Edit : 看起来我们有一个 serverfault 中的类似问题.检查一下

关闭 IIS7 自定义错误将允许将来自您的应用程序的错误响应发送到远程客户端,而不会被 IIS7 的自定义错误模块审查.

您可以通过运行开始>运行>inetmgr.exe"从 IIS7 管理工具执行此操作,在左侧树视图中选择您的网站/应用程序/虚拟目录,单击错误页面"图标,单击编辑功能设置"操作,然后选择详细错误"

来源

Recently my ISP switched our website to an IIS7.0 high availibility cluster. The website is running on PHP5.2.1 and I can only upload files (so no registry tweaks). I had tested the website before and everything seemed to be working, but now the checkout page fails with:

500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

As error messages go, this isn't very informative. I've tried:

ini_set('display_errors', 1);
ini_set('error_log', $file_php_can_write_to );

but both don't seem to do anything.

Anyone know how to get better debugging output?

解决方案

Edit : Looks like we have a similar question in serverfault. Check it out

Turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.

You can do this from the IIS7 Admin tool by running "Start>Run>inetmgr.exe", selecting your website/application/virtual directory in the left-hand tree view, clicking on the "Error Pages" icon, clicking "Edit Feature Settings" action, and then selecting "Detailed Errors"

Source

这篇关于在 IIS7 集群上运行的 PHP 上调试 500 内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

In PHP how can you clear a WSDL cache?(在 PHP 中如何清除 WSDL 缓存?)
failed to open stream: HTTP wrapper does not support writeable connections(无法打开流:HTTP 包装器不支持可写连接)
Stop caching for PHP 5.5.3 in MAMP(在 MAMP 中停止缓存 PHP 5.5.3)
Caching HTTP responses when they are dynamically created by PHP(缓存由 PHP 动态创建的 HTTP 响应)
Memcached vs APC which one should I choose?(Memcached 与 APC 我应该选择哪一个?)
What is causing quot;Unable to allocate memory for poolquot; in PHP?(是什么导致“无法为池分配内存?在 PHP 中?)