Re: ob_gzhandler
| From: | Ernest E Vogelsinger | Date: | Fri, 08 Nov 2002 15:15:18 +0000 |
| Subject: | Re: ob_gzhandler | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-123391@lists.php.net to get a copy of this message | ||
At 16:08 08.11.2002, Serge Paquin spoke out and said:
--------------------[snip]--------------------
>Yes their is always output.
>
>Also the way my system works if it finds a current cache file then it just
>does "readfile" and no database connection.
>
>On that output I use ob_start("ob_gzhandler") and it outputs compressed
>without an error so it seems that ob_gzhandler is working fine that's the
>part that gets me.
--------------------[snip]--------------------
Hmm - one glitch comes to my mind - maybe you need to close the buffer file
before passing the buffer to ob_gzhandler?
function docache ($buffer, $mode) {
$fp=fopen(cachefilename(), "w");
if($fp) {
fputs($fp,$buffer);
fclose($fp);
}
return ob_gzhandler($buffer, $mode);
}
But I believe the problem must be somewhere in the outer logic - the
callback you showed doesn't do any discrimination if it has a cache file or
not. Check here, I'd suggest...
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/