For an example:
php.ini file
... ; Log errors to specified file. error_log = c:/php/php.log ...
Error log file (c:/php/php.log) contains every entry in this format:
[12-Jun-2011 12:58:55] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\r\n [12-Jun-2011 12:59:01] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\r\n [12-Jun-2011 13:01:12] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\r\n [12-Jun-2011 13:02:11] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\r\n [12-Jun-2011 13:11:23] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\r\n [12-Jun-2011 13:12:10] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\r\n
Two carriage return character and one new line per one error line.
Why it happens? How to change error log file to default format:
[12-Jun-2011 12:58:55] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\n [12-Jun-2011 12:59:01] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\n [12-Jun-2011 13:01:12] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\n [12-Jun-2011 13:02:11] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\n [12-Jun-2011 13:11:23] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\n [12-Jun-2011 13:12:10] PHP Notice: Undefined variable: test in C:\www\phpinfo.php on line 2\r\n
PHP Version 5.3.6
Apache/2.2.15 (Win32)
Tested on Windows 7 Home Basic and Windows XP SP3, same results.
php.ini file contains only two strings
log_errors = On error_log = c:/server/php.log
apache phpinfo() script -> http://pastehtml.com/view/awvx1vgpp.html
PS.
sever: nginx 1.0.4
FastCGI + PHP Version 5.3.6
Everything works as expected.
nginx phpinfo() script -> http://pastehtml.com/view/awvwvk9p9.html