Zen Cart Logo
Forums / General Questions / gZip compression error The page you are trying to view cannot be shown because it use

gZip compression error The page you are trying to view cannot be shown because it use

Views: 2,723

Results 1 to 18 of 18
10 Feb 2016, 2:08 PM
#1
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

gZip compression error The page you are trying to view cannot be shown because it use

I get this browser error if gzip=1

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

with gzip=0

Page loads perfectly.

v1.5.1

10 Feb 2016, 2:29 PM
#2
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: gZip compression error The page you are trying to view cannot be shown because it use

I suspect your host has gzip disabled

10 Feb 2016, 11:52 PM
#3
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

That would be me. What file to edit?

11 Feb 2016, 12:44 AM
#5
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

Thanks, but that link explained how to do it in htaccess. I had that already. I want to config apache installed on centos. Not really ZC related. Im searching.

11 Feb 2016, 12:46 AM
#6
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

My file

/usr/local/apache/conf/httpd.conf

<ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule>
11 Feb 2016, 1:09 AM
#7
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

I have read other posts on line from 2009. Same scenario that I have. Gzip enabled with admin off serves up pages not compressed. Turning on admin gzip gives a blank page.

I really dont want to got to every directory and edit each htaccess file to have pages compressed.

11 Feb 2016, 7:56 AM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: gZip compression error The page you are trying to view cannot be shown because it use

pixelpadre:

My file
/usr/local/apache/conf/httpd.conf

<ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule>

I'm thinking that this probably isn't what you need to be doing. mod_gzip hasn't been used by Apache for several years now. It has been replaced with the newer mod_deflate.

This may help (assuming you are using Centos 7)

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-mod_deflate-on-centos-7

Cheers
RodG

11 Feb 2016, 10:53 AM
#9
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

Yea I read that too. I am using centos 6.6. Apache 2.2.27

I tried changing the httpd file to include mod_deflate, but the error message when I restarted service was something along the lines of "already configured for compression" but I can assure you there was no mention of mod_deflate in my httpd.con file.

I will keep plugging along til I find out.

Thanks

11 Feb 2016, 11:39 AM
#10
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

I added this to my httpd.conf file at the bottom to solve my problem.

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.[0678] no-gzip
BrowserMatch bMSIEs7 !no-gzip !gzip-only-text/html
BrowserMatch bOpera !no-gzip Header append Vary User-Agent
DeflateCompressionLevel 9

I think you should lock this thread. No need to add anymore comments.

11 Feb 2016, 12:37 PM
#11
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

I just learned that it didnt fix the problem.

Home page compresses but some others dont.

For example this one does not. http://lakeservers.com/index.php?main_page=index&cPath=7

11 Feb 2016, 11:46 PM
#12
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

nobody?

12 Feb 2016, 1:48 AM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: gZip compression error The page you are trying to view cannot be shown because it use

nobody?
This is not really a ZenCart issue but more of a server config issue
You might be better off posting on one of the sysadmin forums about this

12 Feb 2016, 1:52 PM
#14
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

Maybe. But with the Dr post for the htacess entry, pages will compress. Many have had issues with the built in ZC compression. Maybe it has to be revisited to conform to new apache versions.

:D

12 Feb 2016, 6:23 PM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: gZip compression error The page you are trying to view cannot be shown because it use

At this point Zen Cart has to rely on whether the server administrator has properly configured the server to make compression features available.

All Zen Cart can do is tell PHP to "do it" ... which it does by setting the PHP configuration for zlib.output_compression to 1, and zlib.output_compression_level to whatever Gzip Compression Level you enter in your Admin settings.

After that, it's up to PHP to negotiate with Apache/Nginx/whatever and your browser.

If you've got specific technical suggestions on how Zen Cart can do this better "to conform to new apache versions", I'm all ears.
I just don't see where this is something Zen Cart can do anything about, because it happens at a different processing layer.

14 Feb 2016, 4:28 PM
#16
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

It's just odd that I get compressed output on some pages but not on others when I have zzip enalbed in ZC.

14 Feb 2016, 6:17 PM
#17
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: gZip compression error The page you are trying to view cannot be shown because it use

pixelpadre:

It's just odd that I get compressed output on some pages but not on others when I have zzip enalbed in ZC.

I agree, it does seem odd.
Please provide two links to the same site, one to a page where the compression is working, and one to a page where it isn't, 'cos the thing is, up until now you've had us believing that the gzip wasn't working at all (creating errors or blank pages). The fact that you've now revealed this additional information has changed the game. You, and therefore us, have been barking up the wrong tree trying to solve a problem (gzip not working at all) that doesn't exist.
We need to start the entire thing afresh based on this new information. Being able to see the symptoms "in action" could save hours of speculation and experimentation.

RodG

15 Feb 2016, 1:32 PM
#18
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: gZip compression error The page you are trying to view cannot be shown because it use

RodG:

I agree, it does seem odd.
Please provide two links to the same site, one to a page where the compression is working, and one to a page where it isn't, 'cos the thing is, up until now you've had us believing that the gzip wasn't working at all (creating errors or blank pages). The fact that you've now revealed this additional information has changed the game. You, and therefore us, have been barking up the wrong tree trying to solve a problem (gzip not working at all) that doesn't exist.
We need to start the entire thing afresh based on this new information. Being able to see the symptoms "in action" could save hours of speculation and experimentation.

RodG

ok give me a few days to get back. I have some other distractions right now.