Forum Moderators: phranque

Message Too Old, No Replies

Using Mod_gzip

mod_gzip, how to use mod_gzip, problem in web compression

         

bmehro

11:22 am on Oct 7, 2005 (gmt 0)

10+ Year Member



Hi all,
I need some help with Gzip Compression and am really stuck.

I have a small list of events that have already happened.

1. I asked my Domain service provider for this help and this is what they had to say to me.

"Gzip is supported on the server, but unfortunately we don't have any examples. Go ahead and do a google search on php.net or phpbuilder.com"

and the 2nd Answer
"According to my information gzip compression via PHP is already enabled and working on our servers. You are on your own, however, for how you implement this on your end with coding."

Tell me where do I go with these answers.

I checked my Site Manager and it says in the end of the Page - "GZIP Compression was disabled" HOW AM I SUPPOSED TO ENABLE IT!

Then I found the APACHE TOOL BOX. I loaded this to my Site and when I ran "install.sh", I get a pop window saying "save to Disk"

Now this is getting really crazy.

I do not have access to the PHP or HTTPD.Config files, moreover I cannot find them anywhere on my site.

Can you help me with this please.

Some of the answers I rceived from people flew right over my head.

Can I get a Step by Step Instruction on how I can go about this please.

Thanks
Bobby

encyclo

1:07 am on Oct 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums bmehro.

Do you have a site running PHP, or are you looking to add GZIP compression to a static site running on an Apache server? There are two distinct ways of doing this. In PHP, you can enable GZIP by adding a PHP header to your pages - as it is a header it needs to be send before any of the page content is served. The syntax is very simple:

<?php ob_start ("ob_gzhandler"); ?>

To switch on GZIP compression via Apache itself, you need to create or add to an .htaccess file in your document root. The precise syntax depends on what kind of files you want to compress, but it could look something like this:

mod_gzip_item_include mime ^text/.*

bmehro

10:51 am on Oct 8, 2005 (gmt 0)

10+ Year Member



Hi encyclo,
I use Static Pages, with little or no scripts at all. all ending in .html

I do not have access to the php or the .ht at my domain.

The Service provider says that the gzip compression via php is already enabled on their servers. Well if it is then what do i do to get this thing going at my end. ( For which they had a simple answer - Go to php and get things going.

Would there be a possible solution Encyclo?

bmehro

6:29 am on Oct 11, 2005 (gmt 0)

10+ Year Member



Encyclo,
Adding the Header has served the purpose.
With all else failing at the service Providers end. This has come as a Bliss.

Thanks
Bobby