Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Can you disable zlib.output_compression for one account?

Discussion in 'General Discussion' started by WebHostPro, Oct 22, 2018.

  1. WebHostPro

    WebHostPro Well-Known Member PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,674
    Likes Received:
    21
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    I have one customer that needs to have zlib.output_compression disabled for a Wordpress plug in. Can I do this by adding
    php_flag zlib.output_compression off in the main htaccess file for the account?

    Or maybe a dummy PHP.ini file with this?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. WebHostPro

    WebHostPro Well-Known Member PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,674
    Likes Received:
    21
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    I tried to add a php.ini file with this in the domain's directory but the error still shows in the dashboard for w3 total cache. Any other ideas?

    output_buffering = Off
    output_handler =
    zlib.output_compression = Off
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ronaldst

    ronaldst Well-Known Member

    Joined:
    Feb 22, 2016
    Messages:
    78
    Likes Received:
    11
    Trophy Points:
    8
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    I got an option to enable/disable zlib.output_compression in cPanel > MultiPHP INI Editor.

    Have you enabled zlib serverwide in WHM? If that's the case I'm not sure if a user can still choose to turn it off in cPanel.

    On a sidenote, is it any pros to running zlib server wide? My understanding is that Apache can do such compression more effective, and for all type of content (css, assets etc.) not only PHP.

    What I do know is that WordPress cache plugin (like W3 Total Cache) don't fancy zlib.output_compression at all.
     
  4. WebHostPro

    WebHostPro Well-Known Member PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,674
    Likes Received:
    21
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks, and yes it's server wide so the cPanel compression option will work.

    From what I understand the cPanel website optimization tool in cPanel requires it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,766
    Likes Received:
    440
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @WebHostPro


    When you go to cPanel>>Software>>MultiPHP INI editor and disable it on that account does it not disable it? I tested this on mine and got:

    Code:
    ; cPanel-generated php ini directives, do not edit
    ; Manual editing of this file may result in unexpected behavior.
    ; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
    ; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
    
    display_errors = Off
    max_execution_time = 30
    max_input_time = 60
    max_input_vars = 1000
    memory_limit = 32M
    post_max_size = 8M
    session.gc_maxlifetime = 1440
    session.save_path = "/var/cpanel/php/sessions/ea-php72"
    upload_max_filesize = 2M
    zlib.output_compression = Off
    Added to the .user.ini file

    My phpinfo page indicates it's off as well:

    Code:
    curl mydomain.tld/phpinfo.php |grep zlib.output_compression
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 81742    0 81742    0     0  6020k      0 --:--:-- --:--:-- --:--:-- 6140k
    <tr><td class="e">zlib.output_compression</td><td class="v">Off</td><td class="v">On</td></tr>
    
    Local = Off and Master=ON
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice