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
<html>
<head>
<title>Music Video Generation</title>

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 <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to