#25293 [Com]: Error Reporting to file outputs wrong Windows Newline format
| From: | geoffreylai at msn dot com | Date: | Wed, 17 Mar 2004 06:25:57 +0000 |
| Subject: | #25293 [Com]: Error Reporting to file outputs wrong Windows Newline format | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56568@lists.php.net to get a copy of this message | ||
ID: 25293
Comment by: geoffreylai at msn dot com
Reported By: duerra at yahoo dot com
Status: Closed
Bug Type: *General Issues
Operating System: Windows 2000
PHP Version: 4.3.3
New Comment:
If this parse error do occur on my computer, is there a way which I
could resolve this problem?
The error pop ups everytime I turn on my computer and whenever I click
on to "the Control Panel".
Thank you for your assistance.
Previous Comments:
------------------------------------------------------------------------
[2003-09-24 19:20:22] iliaa@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[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