|
Home > Archive > Apache Server configuration support > January 2007 > mod_gzip: DECLINED:HAS_CE
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
mod_gzip: DECLINED:HAS_CE
|
|
| Prasad 2007-01-22, 1:17 pm |
| HI all ,
I installed mod_gzip module in my apache ,
I added the following lines to httpd.ini file .
LoadModule gzip_module modules/mod_gzip.so
<IfModule mod_gzip.c>
# LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip:
%{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info1
LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n
In:%{mod_gzip_input_size}n Out:%{mod_gzip_output_size}n
Ratio:%{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info2
# LogFormat "%{mod_gzip_compression_ratio}npct." mod_gzip_info1
# LogFormat "%{mod_gzip_result}n In:%{mod_gzip_input_size}n
Out:%{mod_gzip_output_size}n Ratio:%{mod_gzip_compression_ratio}npct."
mod_gzip_info2
# CustomLog logs/gzip.log mod_gzip_info2
CustomLog logs/gzip.log common_with_mod_gzip_info2
mod_gzip_on Yes
mod_gzip_minimum_file_size 300
mod_gzip_maximum_file_size 0
mod_gzip_keep_workfiles Yes
mod_gzip_temp_dir "/tmp"
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.php$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-httpd-php
mod_gzip_item_include mime ^httpd/unix-directory$
mod_gzip_item_include handler ^perl-script$
mod_gzip_item_include handler ^server-status$
mod_gzip_item_include handler ^server-info$
mod_gzip_item_include file \.css$
mod_gzip_item_include file \.js$
mod_gzip_item_exclude mime ^image/.*
mod_gzip_command_version mod_gzip_version
mod_gzip_dechunk Yes
</IfModule>
# End of mod_gzip.
And apache is also running safely now ..
It's compressing .js files , .html files properly .
But ,
when I request .php pages,
*** *************(for some php pages ),
I found in "gzip.log" file that
59.162.197.108 - - [22/Jan/2007:18:17:00 +0530] "GET /home.php
HTTP/1.1" 200 13590 mod_gzip: DECLINED:HAS_CE In:0 Out:0 Ratio:0pct.
,and browser is displaying nothing .
I checked the response headers and content from web-sniffer.net , link
is :
http://web-sniffer.net/?url=http%3A...niffer%2F1.0.24
Headers seem to be okay , but it says that "Content (encoded: 10.63 KiB
/ decoded: 0.00 KiB)" and does n't show any content ..
*** *************( And for some other .php pages ),
I found in "gzip.log" file that
59.162.197.108 - - [22/Jan/2007:18:19:04 +0530] "GET
/teamkollab/user_home.php HTTP/1.1" 302 12249 mod_gzip: DECLINED:HAS_CE
In:0 Out:0 Ratio:0pct.
, and IE browsers say "Page cant'be displayed" and mozilla browser is
asking to save the .php file (it's an empty file )
For the response headers and content from web-sniffer.net , the link
is
http://web-sniffer.net/?url=http%3A...b-Sniffer%2F1.0
.24
Headers and even the content seem to be okay .. it says "Content
(encoded: 1.96 KiB / decoded: 6.45 KiB)"
and shows the dynamic content . Though it shows the proper content, the
browser is unable to display it .
What could be the problem? , please help me ..
| |
|
| "Prasad" <prasadk14@gmail.com> schreef in bericht
news:1169476606.623373.45090@38g2000cwa.googlegroups.com...
> HI all ,
>
> I installed mod_gzip module in my apache ,
> I added the following lines to httpd.ini file .
>
> LoadModule gzip_module modules/mod_gzip.so
> <IfModule mod_gzip.c>
> # LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip:
> %{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info1
> LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n
> In:%{mod_gzip_input_size}n Out:%{mod_gzip_output_size}n
> Ratio:%{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info2
[snipped]
> It's compressing .js files , .html files properly .
>
> But ,
> when I request .php pages,
>
> *** *************(for some php pages ),
> I found in "gzip.log" file that
>
> 59.162.197.108 - - [22/Jan/2007:18:17:00 +0530] "GET /home.php
> HTTP/1.1" 200 13590 mod_gzip: DECLINED:HAS_CE In:0 Out:0 Ratio:0pct.
>
> ,and browser is displaying nothing .
>
> What could be the problem? , please help me ..
>
IIRC by croaking DECLINED:HAS_CE mod_gzip reports it sees an
content-encoding haeder and declines -aka refuses- the request to deflate.
It appears to me 'some' of your php script are sending such header either by
mistake or while zlib.output_compression is used [too].
If php is indeed doing compression on its own, just disable the lines
mod_gzip_item_include file \.php$
mod_gzip_item_include mime ^application/x-httpd-php
in your config to not-invoke mod-deflate on already compressed output
Be aware some browsers cann't handle compression but for text/html.
Compressing a style sheet or externe javascript may cause unpredictable
results ... Just follow the guidances at
http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
Anyway, I'ld stick with mod_deflate untill mod_gzip/2.0.x at least has found
a permanent residance on the internet.
HansH
| |
| Prasad 2007-01-23, 1:32 am |
|
HansH wrote:
> "Prasad" <prasadk14@gmail.com> schreef in bericht
> news:1169476606.623373.45090@38g2000cwa.googlegroups.com...
> [snipped]
> IIRC by croaking DECLINED:HAS_CE mod_gzip reports it sees an
> content-encoding haeder and declines -aka refuses- the request to deflate.
> It appears to me 'some' of your php script are sending such header either by
> mistake or while zlib.output_compression is used [too].
>
> If php is indeed doing compression on its own, just disable the lines
> mod_gzip_item_include file \.php$
> mod_gzip_item_include mime ^application/x-httpd-php
Thanx for your response,
I tried already by disabling the above lines and checked the
response headers and content for such scripts , the content is not
encoded.
> in your config to not-invoke mod-deflate on already compressed output
>
> Be aware some browsers cann't handle compression but for text/html.
> Compressing a style sheet or externe javascript may cause unpredictable
> results ... Just follow the guidances at
> http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
>
> Anyway, I'ld stick with mod_deflate untill mod_gzip/2.0.x at least has found
> a permanent residance on the internet.
>
My server version is " Apache/2.0.59 (Win32) ,PHP/4.4.4
,mod_gzip/2.0.26.1a"..
Will there be any problems with mod_gzip/2.0.x ?
> HansH
| |
|
|
"Prasad" <prasadk14@gmail.com> schreef in bericht
news:1169522379.397508.254480@l53g2000cwa.googlegroups.com...
>
> I tried already by disabling the above lines and checked the
> response headers and content for such scripts , the content is not
> encoded.
You do not have mod_deflate enabled too, do you??
[vbcol=seagreen]
> My server version is " Apache/2.0.59 (Win32) ,PHP/4.4.4
> ,mod_gzip/2.0.26.1a"..
>
> Will there be any problems with mod_gzip/2.0.x ?
Unclear, as the module has no internet residence, there is nu bug(fix)list
to view.
Thus, for now and for me mod_gzip/2.0.x is an 'it did work at least once for
me' hack on 1.3.26.
In general a module's version reflects the version of apache it is
[initially] build for. Apache's internals changed IIRC with version 2.0.46,
so to me these figures do not match too.
HansH
>
| |
| Prasad 2007-01-23, 7:35 am |
|
HansH wrote:
> "Prasad" <prasadk14@gmail.com> schreef in bericht
> news:1169522379.397508.254480@l53g2000cwa.googlegroups.com...
>
> You do not have mod_deflate enabled too, do you??
>
Yeah , I don n't have mod_deflate enabled ...
Can't I get any workaround for this ?
[vbcol=seagreen]
>
> Unclear, as the module has no internet residence, there is nu bug(fix)list
> to view.
> Thus, for now and for me mod_gzip/2.0.x is an 'it did work at least once for
> me' hack on 1.3.26.
>
> In general a module's version reflects the version of apache it is
> [initially] build for. Apache's internals changed IIRC with version 2.0.46,
> so to me these figures do not match too.
>
>
> HansH
|
|
|
|
|