Skip to main content

Compression not working

Comments

8 comments

  • cPanelMichael
    I'm having trouble getting compression working on a VPS server for a client. I've enabled "compress all content" from inside the individual account cpanel. I can confirm that this is properly adding the following code to the .htaccess file in the account root.

    Hello, You can use the following command after uploading a test file to the domain name to verify if the content is compressed:
    curl -v --compressed http://www.test.domain/test.html
    Could you run this command and let us know the output? Thank you.
    0
  • rregister
    Hello, You can use the following command after uploading a test file to the domain name to verify if the content is compressed:
    curl -v --compressed http://www.test.domain/test.html
    Could you run this command and let us know the output? Thank you.


    > GET /test.html HTTP/1.1 > Host: [intentionally excluded] > User-Agent: curl/7.43.0 > Accept: */* > Accept-Encoding: deflate, gzip > < HTTP/1.1 200 OK < Date: Wed, 07 Sep 2016 18:15:53 GMT < Server: Apache < Last-Modified: Wed, 07 Sep 2016 18:14:31 GMT < Accept-Ranges: bytes < Content-Length: 26 < Vary: User-Agent < Cache-Control: max-age=31536050 < Content-Type: text/html
    I initially noticed the problem when using google's pagespeed test, but I've also used sites like
    0
  • cPanelMichael
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0
  • rregister
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you.

    Thanks for the quick response, Michael. Support Request ID is: 7653411
    0
  • rregister
    Thanks for the quick response, Michael. Support Request ID is: 7653411

    Issue resolved. For anyone wondering, because I used easyapache4 with muti php, I needed to add
    output_handler = Off zlib.output_compression = On zlib.output_handler = ob_gzhandler
    to the specific php.ini file (in my case php7). Just enabling compression was not enough to get it working with php files.
    0
  • Jaison V John
    Issue resolved. For anyone wondering, because I used easyapache4 with muti php, I needed to add
    output_handler = Off zlib.output_compression = On zlib.output_handler = ob_gzhandler
    to the specific php.ini file (in my case php7). Just enabling compression was not enough to get it working with php files.

    ---------------------------------- @cPanelMichael ==> Is there any ETA for this bug in the recent cPanel versions?
    0
  • cPanelMichael
    Hello @Jaison V John, Internal case EA-5367 is still open, however there's no specific time frame on it's release date. Adding those entries to the specific php.ini file utilized by the domain name is still required at this time. The case is scheduled for an additional look once the work to ensure all PHP INI editors offered in cPanel/WHM account for all PHP versions and handlers. Thank you.
    0
  • cPanelMichael
    Hello, To update, cPanel version 68 will add the zlib.output_compression option to the MultiPHP INI Editor feature in cPanel and WHM. Additionally, a note in the "Optimize Website" feature within cPanel will direct users on how to enable the zlib.output_compression option for PHP. Thank you.
    0

Please sign in to leave a comment.