We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15003
    • 85 Posts
    How do I know if my server supports zlib?

    I’m on a shared server (Hostgator) so can’t use gzip and I’m trying to find a way to get http compression. If I un-comment the two bottom lines below it doesn’t make any difference.

    Can someone point me in the right direction?

    # Reduce server overhead by enabling output compression if supported.
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5

    Thanks!
    Jules
      • 16702 ☆ A M B ☆
      • 536 Posts
      I have one tool for SEO:

      http://www.seositecheckup.com/

      where have section about:

      - Page Size (Uncompressed)
      - Page Compression Status
      - Page Caching Check

      etc.

      Try...

      :)
        palma non sine pulvere
        • 15175
        • 116 Posts
        You may want to give Minify a look:

        http://code.google.com/p/minify/

          • 15003
          • 85 Posts
          That looks like a great site, thanks for the link. I’m interested in the ob_gzhandler

          I found this http://www.undesign.com.au/gzip_compression_hostgator.php and it worked great, BUT somehow it interfered with the javascript on the page. Not sure about the details because everything rendered as it should when I tested the site, but my client called and said that the tabs were displaying under each other and the menu tree was loading open. I removed: output_handler = ob_gzhandler from the php.ini file and all worked as before.

          at http://us2.php.net/ob_gzhandler it looks like they want you to add the following to each page. I was hoping to not have to do something like this. Is there not some way that this can be handled with in the .htaccess or php.ini file?
          <?php
          
          ob_start("ob_gzhandler");
          
          ?>



            • 15003
            • 85 Posts
            @j_p - I actually have used minify before and was kinda holding out to see if I could use some sort of command in the htaccess or php.ini file.

            When I saw the zlib.output_compression code already in the htaccess file that comes with MODx I thought maybe there was a simpler way of doing it. But since I’m not very familiar with this type of stuff I just don’t know what to do with it.

            Thanks for your input, it’s my back-up plan:-)
            ~Jules

              • 15003
              • 85 Posts
              @j_p - well I ended up using the minify. I just couldn’t find a better option for the situation.

              Thanks everyone!
              Cheers! Jules
                • 15175
                • 116 Posts
                Good stuff.

                I tried everything else to get everything gzipped on my shared hosting - Minify is the only thing that seems to work for me as well.