logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Issue with mod_deflate on el3 server
Author
andrewhere



Joined: 20 Feb 2010
Posts: 4

PostPosted: Sat 20 Feb '10 1:53    Post subject: Issue with mod_deflate on el3 server Reply with quote

The issue that I'm having is that when I turn on mod_deflate on an el3 server. Html/text files end up having some garbage characters at the end which messes up all the pages. It works fine, however on an el5 server.

This is what I have in my httpd.conf.

<IfModule mod_deflate.c>
SetOutputFilter DEFLATE

BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
</IfModule>

Using
Apache 2.2.3, PHP 5.2.10

The PHP zlib.output_compression setting is off so its not compressing twice.
Back to top
andrewhere



Joined: 20 Feb 2010
Posts: 4

PostPosted: Tue 23 Feb '10 0:29    Post subject: Here's the output that I get Reply with quote

HTTP/1.1 200 OK
Date: Mon, 22 Feb 2010 22:21:28 GMT
Server: Apache/2.0.46 (Red Hat)
Accept-Ranges: bytes
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 25

hello����������������
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7306
Location: Germany, Next to Hamburg

PostPosted: Tue 23 Feb '10 16:17    Post subject: Reply with quote

With with browser do you get that result you posted?

Did you enable the deflate logging? If yes, what is in that log?
Back to top
andrewhere



Joined: 20 Feb 2010
Posts: 4

PostPosted: Tue 23 Feb '10 18:56    Post subject: Reply with quote

This is in IE8. Same results in firefox.
It looks like its not compressing properly or something.

This is what shows in the log.

"GET /test.php HTTP/1.1" 25 -/- (-%) "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6.3; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"

This is using
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 23 Feb '10 19:08    Post subject: Reply with quote

I have basically only one difference in my config ... and that is insted of SetOutputFilter I have

AddOutputFilterByType DEFLATE text/html text/plain text/css

Other and unknown mime types will get ignored, which is a good thing.

However what has caught my eye is that you say Apache 2.2.3 yet I see the header telling me Apache 2.0.46. My thought is (since I got caught with this one time) is that you have somehow, probably manually, compiled and/or upgraded the el3 from 2.0.46 to 2.2.3, but quite possibly

/usr/bin/apachectl.sh (spelling may be off) is launching the old 2.0.46 still sitting in place.


Other than that ... I'm clueless Smile


Last edited by glsmith on Tue 23 Feb '10 19:56; edited 1 time in total
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7306
Location: Germany, Next to Hamburg

PostPosted: Tue 23 Feb '10 19:10    Post subject: Reply with quote

maybe mod_deflate is not loaded. You can test that on the command line with

Code:

path\to\httpd -M
Back to top
andrewhere



Joined: 20 Feb 2010
Posts: 4

PostPosted: Tue 23 Feb '10 20:16    Post subject: Reply with quote

-M doesn't work with Apache 2.0, but I am loading the module in httpd.conf

LoadModule deflate_module modules/mod_deflate.so
Back to top


Reply to topic   Topic: Issue with mod_deflate on el3 server View previous topic :: View next topic
Post new topic   Forum Index -> Apache