How to Disable Zlib entirely from PHP?

Greetings,

My PHP is compiled as an apache module with configuration option "--with-zlib".
I need to disable Zlib entirely without recompiling PHP.
I have tried setting the directive "zlib.output_compression" to No in /etc/php.ini with no success.
I also tried uncommenting both "AddEncoding x-compress Z" and "AddEncoding x-gzip gz tgz" in /etc/httpd/conf/httpd.conf with no success also.

Any ideas?

Cheers,

--mBf
mBfAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

minichickenCommented:
Just some ideas:

Did you also comment out this line: ;extension=php_zip.dll

and also after you've done the changes, did you restart apache? You will need to restart to take the new settings.

regards-
0
hernst42Commented:
Hi mBf,
what's you problem with the zlib. If php is compiled with it, the zlib will be included/loaded as the libphp4.so is linked against that library.
To turn off output-compress seti the value to Off (not No)

There is no way to disable zlib without recompiling php aus --with-zlib was not compiled as shared/dynamic loadable extension.
0
mBfAuthor Commented:
minichicken, zlib is compiled in php and is not a loadable extension.

herns42, yes I have set output-compress to Off. I was just writing my question in a hurry.

I found out that I could not disable zlib without recompiling php.

an out of topic question, how can I unload an extention from /etc/php.ini?

Cheers,

mBf
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

hernst42Commented:
You can not unload an build in extension of php without recompiling php.
You can only disable the loading of shared-extensuion if you have a line like extension=gd.so. If you remove that line, that module will no longer be present if php is loaded. If you don't have such a line you can not unload that extension.
0
mBfAuthor Commented:
What I need exactly is to disable the compression of php forums on the fly.
It appears that I can do that by disabling the function 'ob_gzhandler'.

Is there anyway?

Cheers,

--mBf
0
hernst42Commented:
you can disable the function in your php by setting
disable_functions=ob_gzhandler
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mBfAuthor Commented:
Thanks.

I made sure that "disable_functions" is the correct solution although I haven't tried it myself.
I'll be rewarding the points for you now.

Thanks again.

Cheers,

--mBf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.