Re: Re: ob_get_level

From: Date: Mon, 25 Mar 2002 10:02:38 +0000
Subject: Re: Re: ob_get_level
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-81751@lists.php.net to get a copy of this message
Jan Lehnardt wrote:
Hi, On Sun, 24 Mar 2002 19:29:07 -0500 Yasuo Ohgaki <yasuo_ohgaki@yahoo.com> wrote:
I guess you are writing test scripts, right?
bingo ;)
There are cases you need to consider. If you enable output_buffer ob_get_level() == 1 If you enable zlib.output_compression ob_get_level() == 2 If you enalbe zlib.output_compression and trans-sid is active ob_get_level() == 3 ob_start() increment buffer level by 1. So if you are writing test script, you probably want to get diff of level before and after ob_start().
trans sid buffer is registered at level 1. This makes result wrong and trans sid does not work :( IIRC, there is a bug report from user that trans sid does not work when zlib.output compression is enabled. (I forgot about the bug when I wrote previous mail) So your result is right. PHP is not working right :) -- Yasuo Ohgaki
then PHP_4_2_0 is broken for this case. My "test" script for this issue: <?php echo ini_get('session.use_trans_sid'); echo ini_get('zlib.output_compression'); echo ob_get_level(); ob_start(); echo ob_get_level(); echo "\n"; ?>
ini-settings                                                    output
session.use_trans_sid = 0, zlib.output_compression = Off  ->    012    # right, the echo ini_get('zlib.output_compression'); does not output
anything
session.use_trans_sid = 1, zlib.output_compression = Off  ->    112   
session.use_trans_sid = 1, zlib.output_compression = On   ->    112   
session.use_trans_sid = 0, zlib.output_compression = On   ->    112   
I hope I don't miss something. Jan


« previous php.dev (#81751) next »