|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-28 10:05 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 23:00:01 2025 UTC |
Description: ------------ Calls to error_log() are made, and certain output is echoed to the client. When script execution halts, all the previous calls to error_log() are apparently executed again, all at once and in the same order. This effectively results in doubling all logged messages. I have reproduced this in Mac OS X 10.5.3 running a MAMP distribution with PHP 5.2.5, in Ubuntu 8.04 running Zend Core with PHP 5.2.5, and in SunOS 5.8 running Apache2 with PHP 5.2.3. Curiously, this only occurs with a content type of text/html, and apparently has something to do with the javascript. Reproduce code: --------------- <?php error_log('some log message that, via a bug, will be logged twice'); echo <<<HTMLCODE <html> <body> <script type="text/javascript" charset="utf-8"> document.body.style.backgroundImage = 'url()'; </script> </body> </html> HTMLCODE; Expected result: ---------------- Should print out some html with embedded javascript, and write a single entry to the apache error_log file: [Fri Jun 27 13:28:36 2008] [error] some log message that, via a bug, will be logged twice Actual result: -------------- Prints out the html/javascript as expected, but writes TWO entries to the apache error_log file: [Fri Jun 27 13:28:36 2008] [error] some log message that, via a bug, will be logged twice [Fri Jun 27 13:28:36 2008] [error] some log message that, via a bug, will be logged twice