php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22228 ob_get_status with bool_argument crashes with Apache 1.3.22
Submitted: 2003-02-14 19:19 UTC Modified: 2003-02-18 11:48 UTC
From: wloske at yahoo dot de Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.2.3 OS: Win2K SP3
Private report: No CVE-ID: None
 [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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-15 01:47 UTC] moriyoshi@php.net
verified
 [2003-02-15 02:01 UTC] moriyoshi@php.net
Wrong status...

Could you provide us a short and self-contained example script to reproduce this problem?

 [2003-02-15 04:48 UTC] wloske at yahoo dot de
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();
 [2003-02-15 04:57 UTC] wloske at yahoo dot de
I monitored the memory behaviour of Apache. You could
say I gave myself a hint ;-)))

When I reload the script, whether compression is on or
of, and make Apache crash, it restarts itself again
and shows the output.

When I wait a couple of seconds I can see a change of
4K in the memory usage of Apache. When I reload then
it always crashes. When I reload before this memory
change occurs, it does not crash.
 [2003-02-15 08:21 UTC] moriyoshi@php.net
I can reproduce this problem with 4.2.3 but not with 4.3.0 or later version. So this may be fixed in the latest released version (4.3.0). Could try that one?

 [2003-02-18 11:39 UTC] wloske at yahoo dot de
With PHP 4.3.1 this error does not occur anymore. Also
the 4KB memory change in Apache has gone.
 [2003-02-18 11:48 UTC] moriyoshi@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 18 17:00:03 2025 UTC