PHP Error Logs on IIS 7.5/Windows Server 2008

谁说我不能喝 提交于 2019-12-03 17:11:25

问题


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).

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

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?

(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).


回答1:


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

log_errors = On

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

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




回答2:


If you are using xampp in windows. The error log can be find in

cd C:\xampp\apache\logs\

Use the following command to display the latest errors

tail -f .\error.log


来源:https://stackoverflow.com/questions/15604695/php-error-logs-on-iis-7-5-windows-server-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!