PHP Error log file format (php.ini error_log directive) on Windows

余生颓废 提交于 2019-11-29 02:27:26

There are more ini directives to control the output into the error log. If it's not a misunderstanding of the line ending (see my comment), then you might want to look in the ini settings of error_prepend_string and error_append_string. Those two and more related settings are explained on this PHP manual page.

By default, PHP running with not loading the ini and only having the error_log set and logging enabled, it does output a single line only. You can test that on your system as well:

php -n -d error_log=./error.log -d log_errors=1 -r 'error;'

Use this command to make an isolated run and compare it with your output. If it has two line endings as well, then this is probably a bug of your php version.

If not then within your application some settings looks to be altered. You need to find out which setting. Probably you can find it by registering an own error handler and then duming the ini settings.

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