|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-03-14 05:50 UTC] bilo at mit dot it
Since I've upgraded to php 4.3.1 I'm getting the following error with my scripts using ob_gzhandler:
Warning: (null)() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in Unknown on line 0
The wierd thing is that I was getting the warning just when opening the page for the first time, while subsequent ones where ok.
I've lurked across the archive. There's the claim that that problem had been fixed but imho it has not been fixed completely (see below). As a workaround I've found that I've to check if some other handler is loaded before trying to compress. I did it and I'm no longer getting that error.
By the way I don't know who is starting that handler!
In my configuration I've set:
output_buffering = Off
output_handler =
zlib.output_compression = Off
The following script reproduces the problem:
<?
session_start();
$_SESSION['N'] = (isset($_SESSION['N']) ? ++$_SESSION['N'] : 1);
echo "Level = " . ob_get_level() . ";<br>";
echo "Iteration = " . $_SESSION['N'] . ";<br>";
?>
The first time it's launched I get "Level = 1".
From the second iteration on, I get "Level = 0".
It looks like that starting a session makes an ob handler start.
Is this behaviour correct?
I'm using RedHat Linux 6.2 with kernel 2.2.18, glibc-2.1.3-28, gcc-2.96-98, apache 1.3.27 and php 4.3.1.
This is my "configure" line:
./configure \
--with-apxs=/usr/sbin/apxs \
--with-config-file-path=/etc/httpd/conf \
--with-java=/usr/java/jdk1.3.1_02 \
--disable-cgi \
--with-tsrm-pthreads \
--enable-trans-sid \
--enable-sysvsem \
--enable-sysvshm \
--with-zlib \
--with-ssl=shared \
--with-dom=shared \
--enable-xslt=shared \
--with-xslt-sablot \
--with-curl=shared \
--with-gd \
--with-jpeg-dir \
--enable-gd-native-ttf \
--enable-gd-imgstrttf \
--with-mysql=shared \
--with-recode=shared \
--enable-calendar \
--enable-dba=shared \
--with-gdbm \
--with-ndbm \
--with-cdb \
--with-db2 \
--with-flatfile\
--with-kerberos
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
ok it looks like the scripts make use of: ob_start('ob_gzhandler'); and since it is already included in php.ini it gives out the error seen previously...