ID:               17603
 Comment by:       phpuser at dpiworld dot com
 Reported By:      anon-php at sitefoundry dot com
 Status:           Closed
 Bug Type:         Documentation problem
 Operating System: RH 7.2
 PHP Version:      4.2.1
 New Comment:

The current online documentation still (incorrectly) lists:  
  zlib.output_compression as "PHP_INI_ALL" 

on page: 
  http://www.php.net/manual/en/ref.zlib.php


Previous Comments:
------------------------------------------------------------------------

[2002-06-18 06:17:27] [EMAIL PROTECTED]

This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

changed value from "PHP_INI_ALL" to "PHP_INI_SYSTEM|PHP_INI_PERDIR" for
"zlib.output_compression"

------------------------------------------------------------------------

[2002-06-05 10:07:53] anon-php at sitefoundry dot com

Thanks for the suggestion. I regret to report that I can't make it
work: no number of calls to flush(), ob_end_clean(), or
ob_implicit_flush() allow the script to output non-compressed data.

So, this comment: "If you disable it in your script after it has been
started it won't be stopped." actually seems to mean "It is not
possible to disable zlib output compression or buffering within a
script." IMO this would be useful to note on the manual page for
ini_set().

------------------------------------------------------------------------

[2002-06-05 06:21:20] [EMAIL PROTECTED]

This is quite logical because the output compression starts before your
script is executed. If you disable it in your script after it has been
started it won't be stopped.

You can _try_ a couple of ob_end_clean()'s (use ob_get_level() to find
out how many) to stop it. 

Reopening as a documentation problem.

------------------------------------------------------------------------

[2002-06-04 20:33:40] anon-php at sitefoundry dot com

I have the following line in my php.ini:
  zlib.output_compression = On

In experimenting with this, I attempted to disable it within a script
(mostly because I wanted to defeat the output buffering that zlib
performs). I tried several variations of this line in a script:
    ini_set('zlib.output_compression', '0');
    ini_set('zlib.output_compression', 0);
    ini_set('zlib.output_compression', 'off');

In all cases, output is still compressed. Here is a complete script:
<?
    ini_set('zlib.output_compression', '0');
    echo "If compression is disabled, you should be able to read this
via 'lynx -mime_header'";
?>

You can see it here:
http://sitefoundry.com/php/zlib.html

I get this output:
HTTP/1.1 200 OK
Date: Wed, 05 Jun 2002 00:30:51 GMT
Server: Apache/1.3.22
Content-Encoding: gzip
Connection: close
Content-Type: text/html

[non-ascii junk here]

Here is my configure line:
./configure --with-apache=/usr/local/src/apache_1.3.22
--with-gd=/usr/local --with-imap --with-mysql=/usr/local/mysql
--with-config-file-path=/usr/local/apache/conf --enable-debug=no
--enable-track-vars=yes --with-zlib --enable-calendar



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=17603&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to