SOLVED Issues Enabling zlib For W3 Total Cache

ijsaul

Member
Feb 19, 2015
8
1
3
cPanel Access Level
Root Administrator
Aloha,

Server Info: CentOS 7.3 x86_64, WHM 62.0 B20.

I'm working on configuring W3 Total Cache, and have managed to resolve all dependencies and component installations, with the exception of one. No matter what php.ini file I edit, or where I insert various code, the "Compatibility Check" results in a notification:

zlib output compression: Off

I have reviewed numerous documents and threads regarding this, but still not getting anywhere with it.

Thoughts? Thanks! -Ian
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
Hello,

Could you upload a PHPINFO file to the account and verify if it shows if zlib output compression is enabled? If it's disabled, what php.ini file does the PHPINFO file show is loaded?

Thank you.
 

ijsaul

Member
Feb 19, 2015
8
1
3
cPanel Access Level
Root Administrator
Thanks for your prompt response.

The results of phpinfo show the following:

Configuration File (php.ini) Path - /opt/cpanel/ea-php56/root/etc/php.ini​

zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

php.ini - zlib section:

Code:
; 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.
; [URL='http://php.net/zlib.output-compression']PHP: Runtime Configuration - Manual[/URL]
zlib.output_compression = on

; [URL='http://php.net/zlib.output-compression-level']PHP: Runtime Configuration - Manual[/URL]
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.
; [URL='http://php.net/zlib.output-handler']PHP: Runtime Configuration - Manual[/URL]
zlib.output_handler =
-Ian
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
Hello,

Are you using any third-party applications for PHP through CloudLinux or LiteSpeed? If not, could you open a support ticket using the link in my signature so we can take a closer look and see why the configured value isn't reflected in your PHPINFO output? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

ijsaul

Member
Feb 19, 2015
8
1
3
cPanel Access Level
Root Administrator
The resolution, as it turned out, was discovered by Andrew @ cPanel in short order:

In WHM -> Software -> MultiPHP INI Editor -> Editor Mode, you have the following:

zlib.output_compression = Off

This disables zlib.output_compression in your PHP software.

After an Apache restart, it is showing as working in W3 Dashboard.

Thanks Andrew!
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
I'm happy to see the issue is now solved. Thank you for updating us with the outcome.
 
Sep 27, 2015
11
0
1
Egypt
cPanel Access Level
Root Administrator
Since you are using EA4, please note that if you would like to modify the value again or anything else like memory_limit then you need to modify local.ini not php.ini. That's the file which modified by the WHM Editor.