#25293 [Opn->Asn]: Error Reporting to file outputs wrong Windows Newline format
| From: | derick@php.net | Date: | Thu, 28 Aug 2003 14:28:01 +0000 |
| Subject: | #25293 [Opn->Asn]: Error Reporting to file outputs wrong Windows Newline format | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-46847@lists.php.net to get a copy of this message | ||
ID: 25293
Updated by: derick@php.net
Reported By: duerra at yahoo dot com
-Status: Open
+Status: Assigned
Bug Type: *General Issues
Operating System: Windows 2000
PHP Version: 4.3.3
-Assigned To:
+Assigned To: derick
New Comment:
I already have this fixed in my current tree, will commit when I get
some time this week.
Previous Comments:
------------------------------------------------------------------------
[2003-08-28 09:21:17] duerra at yahoo dot com
Description:
------------
When you turn error reporting on in php and set errors to output to a
file:
error_log = phperrors.txt
When there's a syntax error, php outputs the wrong newline format for
windows (\r\n) to the file, effectively causing all errors in php to
appear on a single line in the text file - with a little rectangle
(unknown character?) where the newline is supposed to be.
In tests, using "\n" alone instead of "\r\n" in Windows when writing to
a file will cause this to happen.
Reproduce code:
---------------
<?php
echo "Syntax error here... no semicolon"
//When this is run repeatedly, each error should appear on a new line,
but only appears on one line in the .txt file because of the newline
format
?>
Expected result:
----------------
[28-Aug-2003 09:17:51] PHP Parse error: parse error, unexpected '}' in
C:\Documents and Settings\i1add01\Desktop\php\php-4.3.3-Win32\run.php
on line 13
[28-Aug-2003 09:18:05] PHP Parse error: parse error, unexpected '}' in
C:\Documents and Settings\i1add01\Desktop\php\php-4.3.3-Win32\run.php
on line 13
Actual result:
--------------
[28-Aug-2003 09:17:51] PHP Parse error: parse error, unexpected '}' in
C:\Documents and Settings\i1add01\Desktop\php\php-4.3.3-Win32\run.php
on line 13(newline without carriage return here)[28-Aug-2003 09:18:05]
PHP Parse error: parse error, unexpected '}' in C:\Documents and
Settings\i1add01\Desktop\php\php-4.3.3-Win32\run.php on line 13
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25293&edit=1