php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45381 All error_log calls firing twice under certain conditions...
Submitted: 2008-06-27 18:49 UTC Modified: 2008-06-28 10:05 UTC
From: evan dot kaufman at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.6 OS: All
Private report: No CVE-ID: None
 [2008-06-27 18:49 UTC] evan dot kaufman at gmail dot com
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-28 10:05 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

This is because you set the background image to an empty url(), which results in the same page being called. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 15:01:31 2024 UTC