Re: Weird stuff in apache error logs

From: Date: Sun, 18 Feb 2001 12:46:32 +0000
Subject: Re: Weird stuff in apache error logs
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-46840@lists.php.net to get a copy of this message
Apparently there's a bug somewhere in PHP that causes this. I've seen that in the past but never looked into it yet. My guess is that it's related to broken connections (user hitting stop, etc.). Are you using output buffering by any chance? Zeev At 07:49 18/2/2001, Cameron wrote:
i think there might be a bug in output buffering or mhash somewhere . . . in my error_log file there is getting to be a shitload of html from pages that are generated. some from scripts i made, others from squirrelmail and imp. it does not happen all the time, this probably occur's about 1 in 1000 pages served. there is no error before it, here is a small snippet from the error_log [Sat Feb 17 21:15:39 2001] [notice] Apache/1.3.14 (Unix) PHP/4.0.5-dev configured -- resuming normal operations etc. my auto-prepend file is <?php $doGzip = isset($GLOBALS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip", $GLOBALS["HTTP_ACCEPT_ENCODING"]); ob_start(); header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 ?> my auto-append file is <?php if (isset($doGzip) && $doGzip == '1') { function printBinaryInt($val) { return (chr($val & 0xFF) . chr(($val >> 8) & 0xFF) . chr(($val >> 16) & 0xFF) . chr($val >> 24)); } $content = ob_get_contents(); ob_end_clean(); # Convert HTML tags to uppercase // $content = preg_replace ("/(<\/?)(\w+)([^>]*>)/e", // "'\\1'.strtoupper('\\2').'\\3'", // $content); // $content = stripslashes($content); $send = substr(gzcompress($content, 9), 2, -4); header("Content-encoding: gzip"); header("Content-Length: " . (strlen($send) + 18)); print(chr(31) . chr(139) . chr(8) . chr(0) . printBinaryInt(time()) . chr(0) . chr(3) . $send . mhash(MHASH_CRC32B, $content) . printBinaryInt(strlen($content))); } ?> to see what the server is compiled up with check out http://tnt.dynomyte.net/ suggestions? Cameron -- PHP Development Mailing List To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/

« previous php.dev (#46840) next »