php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26613 ob_gzhandler seems NOT WORKING
Submitted: 2003-12-13 04:48 UTC Modified: 2003-12-25 13:59 UTC
From: sabio71 at hotmail dot com Assigned:
Status: Not a bug Package: Zlib related
PHP Version: 4.3.4 OS: slackware 9.1 stable patched
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
6 + 24 = ?
Subscribe to this entry?

 
 [2003-12-13 04:48 UTC] sabio71 at hotmail dot com
Description:
------------

[configure line]
./configure --with-mysql --with-apache=../apache_1.3.29

[changes to php.ini]
for legacy reasons: register_globals = On

simply put, it seems it doesn't compress ...

i strongly believe is my fault, but i'm not able to figure why

i've tried also with "output_handler = ob_gzhandler" but nothing

Reproduce code:
---------------
[short script descripting]
<?php
ob_start("ob_gzhandler");
..
.
.
ob_end_flush();
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-13 13:59 UTC] iliaa@php.net
What makes you think ob_gzhandler is not working? Are you certain your browser supports zlib encoding?
 [2003-12-15 06:08 UTC] sabio71 at hotmail dot com
A MORE CLEAR EXPLANATION 

yes ILIA, for sure :) !!!. I'm using ie 5, ie 5.5, ie 6, netscape 6, mozilla, konqueror, even lynx ...

i've made some other attempts, in particular i've checked if

1) for some reasons apache was not passing through to php "accept-encoding" but, obviously it is not the case

2) it makes thing behaves differently pokeing with php.ini, like setting [output_buffering = 4096; AND output_handler = ob_gzhandler]
OR
[output_handler = ; AND zlib.output_compression = On]
and calling ob_start() instead of ob_start("ob_gzhandler")

none of the two seems working.

Moreover, it seems the semantic of calling sequence ob_start ... ob_end_flush has changed a bit from version 4.2.3 (yes i know it is VERY VERY old and perhaps the changed behaviour il well documented)

in few words, i'm using an old version of ez-publish (2.1) that works with apache 1.3.27 and php 4.2.3 on linux...
with that combination the system works and compress the http output stream...

on a apache 1.3.29 with brand new php 4.3.4 simply it doesn't... moreover (but this is ez-publish code-base fault) on php 4.3.4 there are some Warnings that impose modification to code-base in order to get a working configuration...
(a not so painless up-grade :) )

however the simple code

[short script descripting]
<?php
ob_start("ob_gzhandler");
..
.
.
ob_end_flush();
?>
still doesn't send a compressed stream...

hoping to be the more clear that i can

greetings from italy
 [2003-12-19 04:09 UTC] sabio71 at hotmail dot com
i'm downloading CVS today (2003 12 19) ... more feedback as soon as possible...

thanx in advance ...

Fabio :)
 [2003-12-22 09:24 UTC] sabio71 at hotmail dot com
Still Not Working...

i'm using php4-STABLE-200312221230, and setting ob_gzhandler doesn't yield a compressed stream...
moreover i'm getting some messages from php, complaining about not being able to set cookies because "headers already sent"... but this is probably an ez-publish 2.1 code-base fault... (i think so even if php4.3.2 worked flawlessly) 

may i help a bit more ???
if u think i can embrace some deeper debugging let me know

it is very important to get compression work as my ISP charges me for the traffic i generate...

greeting from Italy and Merry Christmas :)
 [2003-12-22 12:53 UTC] sabio71 at hotmail dot com
Some More Testing...

at the moment i'm not able to say anything more...

i've finally compiled php 4.3.2 (which have problems with undefined reference of 'errno', solved including errno.h in my_sys.h) with 
apache 1.3.29 on a 
slackware 9.1 STABLE with patches applied (but original kernel 2.4.22, NOT 2.4.23)

even with this configuration php doesn't use compression...
i don't believe anymore is a php fault ...
pheraps there is something different involved ...

however it is strange that php on this platform is unable to understand it CAN send compressed...

the configuration that worked a year and half ago was
slackware 8.0 (kernel 2.2.22)
apache 1.3.27
php 4.3.2

i'm going on with more testing
 [2003-12-22 13:39 UTC] sabio71 at hotmail dot com
THE WORKING CONFIGURATION
apache 1.3.27
php 4.2.3 (NOT 4.3.2 as erroneously stated before)

i've compiled also php 4.1.2 same results...

DEFINITELY I HAVE A PROBLEM WITH MY SOFTWARE PLATFORM

more coming .. stay tuned
 [2003-12-22 14:30 UTC] moriyoshi@php.net
Check if session.trans_sid is enabled in your php.ini.

 [2003-12-23 06:49 UTC] sabio71 at hotmail dot com
enabling or disabling session.trans_sid doesn't change the behavior... sorry

i'm trying apache 1.3.27 and 2.0.48 ...

stay tuned ...
 [2003-12-23 14:38 UTC] sabio71 at hotmail dot com
Dear Sirs,

24 hours to Christmas Time....

i've tried even old apache 1.3.27, php 4.2.3 ... and still doesn't work.. form me now is quite clear...
IS MY FAULT, for some obscure reasons still unknown to me IS MY SOFTWARE PLATFORM (SLACKWARE 9.1 PATCHED) FAULT...

i've 2 configurations that work (one production, one internal for developing)

[configuration 1, internal for developing]
slackware 8.0
with custom-compiled linux 2.2.22
apache 1.3.27
php 4.2.3

[configuration 2, on-line]
Mandrake distro (i'm not so sure about the version)
Apache-AdvancedExtranetServer/1.3.23 (Mandrake Linux/4.1mdk) mod_ssl/2.8.7 OpenSSL/0.9.6c PHP/4.1.2

these two configurations have no problems dealing with "ob_gzhandler" and send zipped http stream

at the moment i have no ideas....

i will try apache 2.0.48

in the end I may configure apache to use mod_gzip but i'm reluctant and, in any case, it isn't the kind of solution i like...

Merry Christmas to all of you ... :D
 [2003-12-25 13:59 UTC] iliaa@php.net
User indicated that this was a problem on their end. 
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Feb 28 19:01:31 2020 UTC