How to enable GZIP Compression?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    How to enable GZIP Compression?

    Ok I'm stumped. Through the Control Panel I've chosen GZIP Output=yes and set the compression level to 1. I verifed that my server is running PHP 4.04.pl1 with Zlib enabled. Yet a test through http://www.leknor.com/code/gziped.php indicates my pages are not being gzip'd.

    My test forum is located at:

    <removed>

    Any advice on how to get gzip to work would be greatly appreciated. Thanks!

    Another thing I need to mention is that I'm on a shared server. I saw a reference in another topic to add the line 'output_handler = ob_gzhandler' to my php.ini file. I did this, but I have no idea where this file is supposed to go. I placed copies in my root, www and forum directories. However I'm still not getting gzip compression.
    Last edited by Steve Machol; Wed 28 Feb '01, 3:25pm.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


  • PeF
    Senior Member
    • Oct 2000
    • 767

    #2
    Create a file called phpinfo.php onto you web directory. Ie: http://machol.com/forums/phpinfo.php and fill it with

    Code:
    <? phpinfo(); ?>
    So we can take a look and give an advice.

    Comment

    • Steve Machol
      Former Customer Support Manager
      • Jul 2000
      • 154488

      #3
      It's already there. Or you could just use this link:

      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
      Change CKEditor Colors to Match Style (for 4.1.4 and above)

      Steve Machol Photography


      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


      Comment

      • ray
        Senior Member
        • Feb 2001
        • 130

        #4
        I tried that test on my forum also, it says its not gziped, how do I enable gzip?

        Comment

        • ray
          Senior Member
          • Feb 2001
          • 130

          #5
          Nevermind actually it is, you have to enter /path to forum/index.php

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            it says mine aren't gzipped either. I defined the full path. For the heck of it... my phpinfo. http://216.122.219.45/info.php

            Comment

            • Kier
              Former Lead Developer, vBulletin
              • Sep 2000
              • 8179

              #7
              Originally posted by Jakeman
              it says mine aren't gzipped either. I defined the full path. For the heck of it... my phpinfo. http://216.122.219.45/info.php
              Your phpinfo() says that your version of PHP does not have zlib compiled into it. Until this changes, you're out of luck as far as vBulletin page compression is concerned.

              Comment

              • Jake Bunce
                Senior Member
                • Dec 2000
                • 46598
                • 3.6.x

                #8


                I would imagine most shared servers disable gzip/zlib to lessen the server's CPU cycles.

                Comment

                • Kier
                  Former Lead Developer, vBulletin
                  • Sep 2000
                  • 8179

                  #9
                  Possibly, but your server has GD enabled, and that could put a major strain on the server if someone really decided to go to town on dynamic image use...

                  I would have a word with your host and see if they will enable zlib for you. If nothing else it's going to lessen their outgoing bandwidth.

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    Could someone please help me with my situation? I still don't know why my site is not being zipped. The host has enabled it, and I've made the appropriate changes in the Control Panel.
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment

                    • Steve Machol
                      Former Customer Support Manager
                      • Jul 2000
                      • 154488

                      #11
                      Originally posted by Ryan Little
                      Right click on the forumhome page and select properties. How large is the page? If it's not gzipped, it will be quite large. If it is, then it will usually be under 10000 bytes.
                      I get 3820 bytes in Internet Explorer and 15119 "content length' in Netscape. However I don't see how this can be an accurate way to determine whether the page was gzip'd since the browser automatically unzips it in order to display the page. Perhaps I don't understand how this works.

                      Are there any other sites that can be used to check gzip compression? Leknor accurately shows that this forum is gzip'd.
                      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                      Change CKEditor Colors to Match Style (for 4.1.4 and above)

                      Steve Machol Photography


                      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                      Comment

                      • Steve Machol
                        Former Customer Support Manager
                        • Jul 2000
                        • 154488

                        #12
                        Hmmm....further testing indicates that my site is being gzip'd but the reporting at the Leknor site is faulty.

                        When I removed GZIP Output in the Control Panel. Leknor correclty reports that the page is not gzip'd and that if it were, compreesion at level '0' would be 12152 and level '1' would be 3354.

                        However after re-establishing the GZIP Output, leknor still reports the page is not gzip'd, but the level at '0' is not 2953 and at level '1' is also 2953.

                        Thus it does appear that gzip is working. The error is in the way Leknor is reporting the results.
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment

                        • Flare
                          Member
                          • Feb 2001
                          • 77

                          #13
                          It looks to me like the site is already being compressed in some form or another.

                          The reason I say this is the fact that the page that I am using to test on your system, when sent, is about 11k, give or take a few bytes.

                          When actually viewed, it's over 95k, which is accurate for that type of page. As such, it looks to me like it's being compressed (nicely I might add, yay text!) and zlib is rejecting the compression because it would increase the file size.

                          I would say it's safe to assume that compression is already being done for you by some (as yet) unknown method employed by your host. They MAY be using zzip or some other off the wall compression method. Leknor only tests for straight GZIP.

                          Comment

                          • Dave#
                            Senior Member
                            • Jul 2000
                            • 1845

                            #14
                            God Damnit.

                            I just checked and I have not installed PHP4 with zlib support

                            Reinstall called for...
                            http://forums.cpfc.org/

                            Comment

                            • mel
                              Member
                              • Feb 2001
                              • 37

                              #15
                              How do I know whether my PHP support zlib?
                              I am using IIS.
                              Last edited by mel; Thu 1 Mar '01, 10:00pm.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...