在IIS7群集上运行的PHP上调试500内部服务器错误
最近我的ISP将我们的网站切换到IIS7.0高可用性集群。该网站运行在PHP5.2.1上,我只能上传文件(所以没有注册表调整)。我之前测试了网站,一切似乎都有效,但现在结帐页面失败了:
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 - 内部服务器错误。
您要查找的资源存在问题,无法显示。
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?
编辑:看起来我们有 serverfault中的类似问题。检查出来
Edit : Looks like we have a similar question in serverfault. Check it out
关闭IIS7自定义错误将允许将应用程序的错误响应发送到远程客户端,而不会被IIS7的自定义错误模块审查。
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.
您可以通过运行开始>运行> inetmgr.exe从IIS7管理工具执行此操作,在左侧树视图中选择您的网站/应用程序/虚拟目录,单击错误页面图标,单击编辑功能设置操作,然后选择详细错误
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"