How to disable zlib support?

How can I disable zlib support? I viewed my php.ini file and didn’t see anywhere to disable. Anyone know how to do this?

This is the only area I saw a mention of zlib within the file (lines 148-177):

; You can redirect all of the output of your scripts to a function.  For
; example, if you set output_handler to "mb_output_handler", character
; encoding will be transparently converted to the specified encoding.
; Setting any output handler automatically turns on output buffering.
; Note: People who wrote portable scripts should not depend on this ini
;       directive. Instead, explicitly set the output handler using ob_start().
;       Using this ini directive may cause problems unless you know what script
;       is doing.
; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
;       and you cannot use both "ob_gzhandler" and "zlib.output_compression".
; Note: output_handler must be empty if this is set 'On' !!!!
;       Instead you must use zlib.output_handler.
;output_handler =

; 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
;zlib.output_compression_level = -1

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

[B]disable_functions[/B] string
This directive allows you to disable certain functions for security reasons. It takes on a comma-delimited list of function names. disable_functions is not affected by Safe Mode. This directive must be set in php.ini For example, you cannot set this in httpd.conf.
I guess, disable_functions = ob_gzhandler in the ini would do it.

Restarted Apache and still says it’s enabled :frowning:

But is it actually usable within a script?

on unix, you could compile without it

keep in mind there’s still stuff like ini_set() and the stream wrappers

Used “disable_functions = ob_gzhandler” and tried running the script with no success. I want to use TinyMCE w/gZIP compression, docs say it wont work with zlib enabled. Makes no sense because on my local environment with MAMP, it say zLib is enabled, but gZip compression is working???

This mean I need to reinstall PHP? Have no clue how to do that and don’t want to mess up the server.

Thought this would be an easy on/off swith :mad:

Zlib is compiled statically right into the PHP binary, so you will have to re-compile PHP without zlib. There is no way around that.

I kind of find it funny that in order for TinyMCE to use Gzip it needs to turn off Zlib which has the Gzip functionality…

Is this on a server that you control? Maybe this is an Apache configuration issue.

Try zlib.output_compression = 0

Yeah makes no sense!

Yeah, I’m on a (mt) DV 3.5

I’ll give that a shot. Tech. Support said “zlib.output_compression = Off” should be “off”. Im just getting back around to this and will let everyone know. Thanks for the help!