The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Issues Enabling zlib For W3 Total Cache

Discussion in 'Workarounds and Optimization' started by ijsaul, Apr 7, 2017.

  1. ijsaul

    ijsaul Registered

    Joined:
    Feb 19, 2015
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,029
    Likes Received:
    1,277
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  3. ijsaul

    ijsaul Registered

    Joined:
    Feb 19, 2015
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    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
     
    #3 ijsaul, Apr 7, 2017
    Last edited by a moderator: Apr 7, 2017
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,029
    Likes Received:
    1,277
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  5. ijsaul

    ijsaul Registered

    Joined:
    Feb 19, 2015
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    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!
     
    cPanelMichael likes this.
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,029
    Likes Received:
    1,277
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm happy to see the issue is now solved. Thank you for updating us with the outcome.
     
  7. Mostafa Hussein

    Joined:
    Sep 27, 2015
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
Loading...

Share This Page