From:             evan dot kaufman at gmail dot com
Operating system: All
PHP version:      5.2.6
PHP Bug Type:     Unknown/Other Function
Bug description:  All error_log calls firing twice under certain conditions...

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


-- 
Edit bug report at http://bugs.php.net/?id=45381&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45381&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45381&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45381&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45381&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45381&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45381&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45381&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45381&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45381&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45381&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45381&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45381&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45381&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45381&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45381&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45381&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45381&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45381&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45381&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45381&r=mysqlcfg

Reply via email to