Windows上的PHP错误日志文件格式(php.ini error_log指令)
举个例子:
php.ini文件 ... ; Log errors to specified file. error_log = c:/php/php.log ... 错误日志文件(c:/php/php.log)包含此格式的每个条目: [12-Jun-2011 12:58:55] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rrn [12-Jun-2011 12:59:01] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rrn [12-Jun-2011 13:01:12] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rrn [12-Jun-2011 13:02:11] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rrn [12-Jun-2011 13:11:23] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rrn [12-Jun-2011 13:12:10] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rrn 每个错误行有两个回车字符和一个新行. 为什么会这样? [12-Jun-2011 12:58:55] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rn [12-Jun-2011 12:59:01] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rn [12-Jun-2011 13:01:12] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rn [12-Jun-2011 13:02:11] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rn [12-Jun-2011 13:11:23] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rn [12-Jun-2011 13:12:10] PHP Notice: Undefined variable: test in C:wwwphpinfo.php on line 2rn PHP版本5.3.6 php.ini文件只包含两个字符串 log_errors = On error_log = c:/server/php.log apache phpinfo()脚本 – > http://pastehtml.com/view/awvx1vgpp.html PS. sever:nginx 1.0.4 一切都按预期工作.
有更多的ini指令来控制输出到错误日志中.如果它不是对行结尾的误解(请参阅我的注释),那么您可能希望查看error_prepend_string和error_append_string的ini设置.这些两个和更多相关的设置在
this PHP manual page上解释.
默认情况下,PHP运行时没有加载ini并且只启用了error_log并启用了日志记录,它只输出一行.您也可以在系统上测试它: php -n -d error_log=./error.log -d log_errors=1 -r 'error;' 使用此命令进行隔离运行并将其与输出进行比较.如果它有两个行结尾,那么这可能是你的php版本的错误. 如果没有,则在您的应用程序中,某些设置看起来会被更改你需要找出哪个设置.也许您可以通过注册own error handler然后使用ini设置来找到它. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows – 价格合理的多终端心跳软件
- active-directory – Windows Active Directory备份到文件
- windows-server-2008 – “以批处理作业登录”用户权限被GP
- Windows Defender Antivirus从C#扫描[AccessViolation exce
- windows – 如何通过WSUS安装PowerShell 3.0或4.0
- Windows缺少Python.h
- windows-server-2008 – 两个本地网络,但Windows Web Serve
- 如何在窗口外单击鼠标关闭Vaadin子窗口?
- win10下的MongoDB安装和配置
- windows-phone-7 – Windows手机中的SQLCE性能非常差