php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45202 zlib.output_compression can not be set with ini_set()
Submitted: 2008-06-07 16:38 UTC Modified: 2009-05-26 05:57 UTC
Votes:5
Avg. Score:3.0 ± 1.3
Reproduced:4 of 5 (80.0%)
Same Version:1 (25.0%)
Same OS:0 (0.0%)
From: e dot ehritt at web dot de Assigned:
Status: Closed Package: Zlib related
PHP Version: 5.2.6 OS: Linux 2.6.24.7 i686
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: e dot ehritt at web dot de
New email:
PHP Version: OS:

 

 [2008-06-07 16:38 UTC] e dot ehritt at web dot de
Description:
------------
Configure Command

./configure --prefix=/opt/php/526 --mandir=/opt/php/man --disable-all --disable-cgi --disable-short-tags --enable-memory-limit --with-apxs2=/opt/apache/228/bin/apxs --with-config-file-path=/opt/conf --with-zend-vm=GOTO 

Server API          Apache 2.0 Handler
PHP API             20041225
PHP Extension       20060613
Zend Extension      220060519
Debug Build         no
Thread Safety       enabled
Zend Memory Manager enabled
IPv6 Support        enabled


Relevant Part of phpinfo()

ZLib Support     enabled 
Stream Wrapper   support   compress.zlib:// 
Stream Filter    support   zlib.inflate, zlib.deflate 
Compiled Version 1.2.3 
Linked Version   1.2.3 

Directive                      Local    Master
zlib.output_compression        On       Off
zlib.output_compression_level  9        -1
zlib.output_handler            no value no value



### Description ###

If configuration of zlib.output_compression zlib.output_compression_level is seeded in a php.ini, there are no problems. Output is managed as configured.
If configuration of zlib.output_compression zlib.output_compression_level is determined by ini_set(), phpinfo() adopt it but not at all output is compressed.

As you can see other Modules are not enabled. Additional zlib extension was built by phpize.

Reproduce code:
---------------
<?php
ini_set('zlib.output_compression',true);
ini_set('zlib.output_compression_level',9);
phpinfo();
?>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-21 10:04 UTC] dypa at bk dot ru
not reproduced in win 5.2.9-2
not reproduced in 5.2.6-1+lenny2
 [2009-05-25 18:54 UTC] e dot ehritt at web dot de
Bug is reproducible on different system and other versions (x86_64-pc-linux-gnu 2.6.29.3 / php5.3-200905242230 / httpd-2.2.11) ,changes are undiscernible.

Furthermore I starded a comparing test and set adequate directives in my php.in. In Konqueror (KDE-Browser) I saw that:

? ?W?o?6?޿⪢C[XO?i?\?A8?{m?/-??(*???Q?35Q?4???H??#{?Ǘ?ş? D*?a?????Ӷ?6G?=^?????| ???B?1?'?mO.0???譮?*?V c???W??? ????6?}Cэ??,C???p?$?u(E????x?*?.??N?t?.v4@??????v%?2W$a???bfT?ҧ??mBd?x?tӅ?h?E??")?Č_?m?g??-?P_H?5? ?v?q?5T$n???{??J??*?D??.??9 ?4?ؿ!??S???H?B?(?*?; (?4c?R ????dat7W?ҴU?a???,I?T??. ??????n??L?,??Ti???@}>??v͡?O?=??dtg???y?$w[?[=??<??????l????6?||t8kZa)? &??????????Q)4D ?<???h????h?XuG???w?#?X?@E8v?8???????<`ܳ????VL????Ļ?=???%T?$?????|??????U߸?<?O?5..O.??˯?2???}?`z??n?t?v~L??o????K???}?Al?) ?þ?4 P?o ???CD? ?48?H?N(?vl{?^[??ũ??D???I?o؊f??????Ŀ?g??I?u???yd???O???9?x?6g8tw8:9? 1???0?(?$XݽX?1Ы_?̰R@?jZ?ը????ᢼ6J???x??zK?@/?????15?m?h%?Wn????s?J]?<??????m?"?pN?????iz???&?xX4a?????T%~??s?? ?D?:??k?hN??so$???9???Hƒ:X????lw-??S??[0Ml+??ۑH?Mт?H?????H?aO??j?K???7cm03??=?5S?I?M???&?"j{?g???d??du?K?????t?=$??Ծ?'????M?e????c???L????A??8?????,?(r??#?A?/L???0f??J?-??T??:pʵ ??b?h?p???w:?g?a??C?1?a.SA????????HO??]?e????$A?{y?b??w?ϊ??ւ?Df4x>??j?3Ӆ?? Šp?zX??l????????0Q,#?q^T־????!6?_Q? ?s!?t???Cqqx?* `NVTm_?????i?3??p???ba?f?-v?dW???;????2tEC? W"???\?Ւ?L?ti?ր0?D???????/lYYf????ٌK?0?5U??N?T+???Q??6?5?U>X?p\??)??K ?6?)?6??2?ź2??wE?L???ۅ??x?????/]Qί ?b}????T?ѓ?<????d?G?"???Y??B7?T?P??r??9?(?? ??G?)????9?L8^i? ???Yao?<?+?>L[??l??7Do?0c:M?????bJ /ۯ??N`??uݗrg?s????9W;Cnz?^g??zY?w??>/?????4??l?\?n?c?B???H??O2m?H,??G?l?T???;??j?m?u???6j??? ?9ovpKN)?DbHC????D?`??]|?H?znY??v?D??9s?Z???????#??"C@9?:ޫ??A? A?N[??? t?%?m8u11?g? ???Y3~??_??D??>? K*??9?,??^????#??X????dB<?&?Mf|??49?*???Lv+B?y5![????Ez?R????e<????Ll???N?_???ӿҝ?=??LOO?* Ik` ‘?9?W#5? ?ya`B:4??????O\????f냰?\?+?T?q冊?D????s?????w\Ϋw?h??z?????xu?W ??A0r??SJ?ת??aH?)ѩ`??!#7???'?h?Ǻ????????#L=8{?%)?V???q??3?b???~?Gp#ѧ????^???f^А??\?e???Ø?X?6?&w_5K ?~?F????:???????P??V>???Ѩ????A???F??Ō?B?7.[???'?Y1?&+????w? ???ZMO?0?7??~ '????#7+K?Q??Q>?????&????"?K;?$??g?????-?ʰÑ??;z?T gP?7?ȹЮ?6ϊ#y-?? ?w걻p??? ZK?0F????O?c>!??X?o??????<%???K??dg??w?h?WZ?[E?bqb?K????K&%vHpTC?? ??Mp?⩲?UMN?x#?A-Tv???????6???U?;[Ш=}6??.??3??P??Ьo?ݷJ{??rǎ?az|?}?.;??|;??!D꾉4OS??1HB?>Z?+2ɬ6??B?;˙?9Pdd??S?5??:?٘v?U??R?3v???u?:?I?ͼi??jhۖ@Ԓ?A??fJ?Ѩu?8?'??? r0?by8Q!?b)?"??w?e&w??????|?5??!?!??B??L4?ީu?????d?RU??$?䊵?)N???uĭl?۵??2?/

That means, PHP do not respect RFC 2616. Strict standard conform browser needs a response header Content-Encoding and Vary
ob_gzhander sends the HTTP headers. It shows you: It is
possible to merge into version 5.2 and later. You are able to do so as well.
 [2009-05-26 05:57 UTC] jani@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 14:01:31 2024 UTC