IIS 7.5/Windows Server 2008上的PHP错误日志 [英] PHP Error Logs on IIS 7.5/Windows Server 2008

查看:291
本文介绍了IIS 7.5/Windows Server 2008上的PHP错误日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于在运行IIS 7.5的Windows 2008 Server上应该查找包含php错误的日志文件的情况,我感到困惑.

I'm confused about where I should be looking for a log file containing php errors on a Windows 2008 Server running IIS 7.5 (I'm more familiar with the Mac OS X setup for this).

在我的php.ini文件中,我将log_errors设置为开",但是在此文件夹中显示的IIS日志中没有看到任何php错误:

In my php.ini file I have log_errors set to "On" but I'm not seeing any php errors in the IIS logs that appear in this folder:

C \ inetpub \ logs \ LogFiles

C\inetpub\logs\LogFiles

此文件是否可能包含php错误,或者我是否仅需要为php错误指定一个新文件?

Is it possible to have the php errors included in this file or do I need to specify a new file just for php errors?

((我正在尝试对正在生成500的站点进行故障排除–发生PHP错误的内部服务器错误.我发现此站点 http://www.webdigi.co.uk/blog/2009/php-on -windows-server-2008-500-internal-server-error-on-iis/,它解释了如何通过服务器上的RDP会话访问页面时如何查看错误,但我需要能够记录这些并查看日志,因为我将永远不会拥有RDP访问权限.

(I'm trying to troubleshoot a site that is generating 500 – Internal server error for a php error. I've found this site http://www.webdigi.co.uk/blog/2009/php-on-windows-server-2008-500-internal-server-error-on-iis/ that explains how I can view the error when accessing the page via an RDP session on the server, but I need to be able to log these and view the log as I won't always have RDP access).

推荐答案

在php.ini 中(您可以在"c:\ program files(x86)\ php \ {PHP Version}"下找到它)更改以下设置:

In the php.ini (you can find this under "c:\program files (x86)\php\{PHP Version}") change these settings:

log_errors = On

然后将Windows事件日志的 error_log 设置为 syslog :

Then set error_log to syslog for the windows event log:

error_log = syslog

或指定磁盘上的位置,例如:

Or specify a location on disk such as:

error_log = C:\Windows\temp\php_errors.log

请确保未在文件的其他位置设置 error_log log_error 值.

Make sure that the error_log or log_error values aren't being set elsewhere in the file.

这篇关于IIS 7.5/Windows Server 2008上的PHP错误日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆