php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21854 Output compression stops working
Submitted: 2003-01-23 20:19 UTC Modified: 2003-02-13 19:16 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: rubberneck at wwisp dot com Assigned:
Status: Closed Package: Zlib related
PHP Version: 4.3.0 OS: Redhat 7.2
Private report: No CVE-ID: None
 [2003-01-23 20:19 UTC] rubberneck at wwisp dot com
./configure  --with-mysql=/usr --with-apxs=/usr/local/apache/bin/apxs --with-zlib --with-gd --with-gmp --enable-bcmath --enable-sockets
--enable-debug

php.ini
zlib.output_compression = On

Apache 1.2.37 
./configure \
"--with-layout=Apache" \
"--enable-module=most" \
"--enable-shared=max" \


After the server is running for about 30seconds to 1 min it stops compressing pages. This can been seen by looking at HTTP Response Headers in phpinfo(); and also using http://leknor.com/code/gziped.php to check the page.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-28 16:57 UTC] rubberneck at wwisp dot com
Compiled this the same expect without the --enable-debug on a different server also running Redhat 7.2. 

The results are a little different. (Could be the same there is alot less traffic on this server). Basicly i can sit there refreshing a page and sometimes it will compress it sometimes it will not.


Below are some of the access log entrys you can see by the sizes of the pages when it is compressing and when it is not. This can also been seen by refreshing phpinfo(); with a  browser but no way to really show you that.

209.12.56.114 - - [28/Jan/2003:16:37:33 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:35 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:37 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:39 -0600] "GET / HTTP/1.0" 200 1967 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:41 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:42 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:44 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:46 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:48 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:50 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:53 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:55 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:57 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:37:59 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:01 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:03 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:05 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:17 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:21 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:26 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:29 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:31 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:33 -0600] "GET / HTTP/1.0" 200 9843 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"
209.12.56.114 - - [28/Jan/2003:16:38:36 -0600] "GET / HTTP/1.0" 200 1967 "http://Leknor.com/code/gziped.php" "Leknor.com gzip tester"


66.182.128.203 - - [28/Jan/2003:16:49:39 -0600] "GET / HTTP/1.0" 200 1967 "-" "ApacheBench/1.3d"
66.182.128.203 - - [28/Jan/2003:16:49:39 -0600] "GET / HTTP/1.0" 200 9843 "-" "ApacheBench/1.3d"
66.182.128.203 - - [28/Jan/2003:16:49:39 -0600] "GET / HTTP/1.0" 200 9843 "-" "ApacheBench/1.3d"
66.182.128.203 - - [28/Jan/2003:16:49:39 -0600] "GET / HTTP/1.0" 200 9843 "-" "ApacheBench/1.3d"
66.182.128.203 - - [28/Jan/2003:16:49:39 -0600] "GET / HTTP/1.0" 200 9843 "-" "ApacheBench/1.3d"
66.182.128.203 - - [28/Jan/2003:16:49:39 -0600] "GET / HTTP/1.0" 200 9843 "-" "ApacheBench/1.3d"
66.182.128.203 - - [28/Jan/2003:16:49:39 -0600] "GET / HTTP/1.0" 200 1967 "-" "ApacheBench/1.3d"
66.182.128.203 - - [28/Jan/2003:16:49:39 -0600] "GET / HTTP/1.0" 200 1967 "-" "ApacheBench/1.3d"
 [2003-01-28 22:05 UTC] rubberneck at wwisp dot com
This also still happens with php4-STABLE-200301282030
 [2003-01-29 00:11 UTC] sniper@php.net
Is zlib.output_compression the only setting you have
changed from the php.ini? And which one did you use as base, php.ini-dist or php.ini-recommended ?

 [2003-01-29 00:23 UTC] rubberneck at wwisp dot com
I used the php.ini-recommended. If you need i can post all of my php.ini settings or anything else you need.

Also some updates from testing a little more it seems to stop working per httpd process. Witch is where the working coming and going is coming from. Once that once process stops compressing it stops till you restart apache. I was able to find this by making a script that did getmypid() and sitting there realoading it checking the pid numbers. 

Also the best way i have found to reproduce this is to keep refreshing a script that has phpinfo(); in it on my servers after about 5-10 refreshes the compression starts going flaky.
 [2003-01-29 00:43 UTC] sniper@php.net
Just add output of this command:

# diff -u php.ini-recommended /usr/local/lib/php.ini

That'll show us what the changes were.

And easier to reproduce this is propably by running apache
in foreground:

# /usr/local/apache/bin/apachectl stop
# /usr/local/apache/bin/httpd -X

Try that and let us know if you can get it fail then.

 [2003-01-29 01:07 UTC] rubberneck at wwisp dot com
My ini file was quit differnt i belive it was from a older version so i copied over the new one and changed only the
zlib.output_compression setting below is the diff

--- php.ini-recommended Thu Dec 26 08:07:59 2002
+++ /usr/local/lib/php.ini      Wed Jan 29 01:03:00 2003
@@ -127,7 +127,7 @@
 ;       also.
 ; Note: output_handler must be empty if this is set 'On' !!!!
 ;       Instead you must use zlib.output_handler.
-zlib.output_compression = Off
+zlib.output_compression = On

 ; You cannot specify additional output handlers if zlib.output_compression
 ; is activated here. This setting does the same as output_handler but in




/usr/local/apache/bin/httpd -X
Doing this it still fails only takes about 1 refresh and it's dead.
 [2003-01-29 07:43 UTC] tux at devel dot ee
i had the same problem, but after the php.ini update, everything worked fine... tnx sniper...
 [2003-01-29 11:38 UTC] rubberneck at wwisp dot com
tux witch ini file did you use the php.ini-dist or the php.ini-recommended?
 [2003-01-29 15:11 UTC] rubberneck at wwisp dot com
I tried using both .ini files the php.ini-dist and the php.ini-recommended changing only the zlib.output_compression setting and still have the same issue.
 [2003-01-30 02:55 UTC] tux at devel dot ee
i used php.ini-recommended.

and changed zlib ompression and some error directives.

my system:
rh 7.2
php 4.3.0
apache 1.2.37
zlib 1.1.4
 [2003-01-31 16:20 UTC] rubberneck at wwisp dot com
Since i was running zlib 1.1.3 i updated it to 1.1.4 and it and i am still having the same issue.
 [2003-01-31 16:21 UTC] rubberneck at wwisp dot com
As a test i downgraded to 4.2.3 and it does NOT have this issue.
 [2003-02-09 10:50 UTC] moriyoshi@php.net
Maybe related to bug #19436
 [2003-02-13 00:35 UTC] sniper@php.net
FYI: I can not reproduce this with Apache 1.3.27 + PHP 4.3.1-dev. 

Try running this in GDB:

# gdb /usr/local/apache/bin/httpd
(gdb) run -X

And check what happens when it 'dies'. If there is no
crash, press ctrl+c and:

(gdb) bt

 [2003-02-13 17:31 UTC] rubberneck at wwisp dot com
Using php4-STABLE-200302132030 This problem seems to be fixed.  If needed i can still load up 4.3.0 or php4-STABLE-200301282030 and give you the gdb output if you would like.
 [2003-02-13 19:16 UTC] sniper@php.net
If it is fixed in latest stable snapshot -> closed.

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Aug 06 02:01:24 2020 UTC