ob_start("ob_gzhandler") producing garbage before document header
| From: | Graham Anderson | Date: | Mon, 19 Jan 2009 03:21:25 +0000 |
| Subject: | ob_start("ob_gzhandler") producing garbage before document header | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-286640@lists.php.net to get a copy of this message | ||
Hi, using ob_gzhandler produces a 5-8 characters, �“×2���, before the document header.
Using ob_start() does not produce the text garbage.
Is there a way to get ob_start("ob_gzhandler") to behave?
Many thanks in advance
Abridged Code:
ob_start("ob_gzhandler"); //produces initial text garbage
# ob_start() //Produces No initial text garbage
# Cache the output
$data = ob_get_contents();
//ob_end_clean(); Can't seem to make this work with ob_gzhandler
# Remove any whitespace that screws up the headers (cannot modify headers error)
print trim($data);
# Flush in all ways known to man
flush(); ob_flush(); ob_end_flush();