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