mBf
asked on
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
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
Any ideas?
Cheers,
--mBf
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.
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.
ASKER
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
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
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.
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.
ASKER
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
It appears that I can do that by disabling the function 'ob_gzhandler'.
Is there anyway?
Cheers,
--mBf
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
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-