# zlib.output_compression on -> garbage

- Thread: https://externals.io/message/7646
- Original archive: https://news-web.php.net/php.internals/7646
- Started by Sascha Schumann on 2004-02-08T18:10:30+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #7646 — Sascha Schumann — 2004-02-08T18:10:30+00:00

URL: https://externals.io/message/7646#7646

Is "on" supposed to produce garbage (apparently
    Content-Encoding is simply missing), while 1 is the one true
    setting?  I always thought they were equivalent in the
    context of a boolean flag.

    # works
    php_admin_value zlib.output_compression 1

    # compression, but incomplete HTTP headers
    php_admin_value zlib.output_compression on

    Tested with current PHP 4.3.5 tree.

    - Sascha

---

## #7850 — Jani Taskinen — 2004-02-15T21:29:35+00:00

URL: https://externals.io/message/7646#7850 · In reply to: #7646

>    Is "on" supposed to produce garbage (apparently
>    Content-Encoding is simply missing), while 1 is the one true
>    setting?  I always thought they were equivalent in the
>    context of a boolean flag.
>
>    # works
>    php_admin_value zlib.output_compression 1
>
>    # compression, but incomplete HTTP headers
>    php_admin_value zlib.output_compression on
>
>    Tested with current PHP 4.3.5 tree.

    From php.ini-dist:
    
; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
; Note: Resulting chunk size may vary due to nature of compression. PHP
;       outputs chunks that are few hundreds bytes each as a result of
;       compression. If you prefer a larger chunk size for better
;       performance, enable output_buffering in addition.
; Note: You need to use zlib.output_handler instead of the standard
;       output_handler, or otherwise the output will be corrupted.
zlib.output_compression = Off

    So it actually shouldn't be boolean option at all..?

    --Jani
