|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-02-14 19:19 UTC] wloske at yahoo dot de
ob_get_status() works but ob_get_status(true) crashes with Apache on Win2K SP3 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Feb 08 13:00:01 2026 UTC |
The following code is a short form of what I have in the production environment. Switching back and forth between buffercompression on and off makes it crash. It seems only to happen when compression is on. Unfortunately it does not happen all the time. I could not find out under which condition it crashes but it happens very frequently. Around every third or fourth reload. Sometimes with the tenths ;-). If you wait a longer time between reloads it seems to happen every time. Could it be something with the cache or the buffer in memory itself? The output of the variable which contains the status seems not to have something to do with it. When I remove the var_dump it also crashes. HTH wolfgang ---- 8< Snip --------------- $outputbuffering = true; $buffercompression = false; function start_buffering(){ global $outputbuffering,$buffercompression; if ($outputbuffering == true AND $buffercompression == true){ ob_start("ob_gzhandler"); }elseif ($outputbuffering == true AND $buffercompression == false){ ob_start(); } } function stop_buffering(){ global $outputbuffering; if ($outputbuffering == true){ $obstat=ob_get_status(true); var_dump($obstat); ob_end_flush(); } } start_buffering(); print "Hello World<BR>"; stop_buffering();