Zen Cart Logo
Forums / All Other Contributions/Addons / Sidebox Anywhere and gzip compression

Sidebox Anywhere and gzip compression

Views: 938

Results 1 to 3 of 3
21 Feb 2011, 9:21 PM
#1
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Sidebox Anywhere and gzip compression

Ok this is a continuation of this thread its just moved away from the original topic

Basically
I am using the "sidebox anywhere" mod to display the "new products" on my main page

http://scrapbookoutletnz.co.nz/maani2/index2.php

That page may not load for you, i know it loads in Opera,but I can't get it to load in any other browser

Unfortunately it is spitting out gibberish see here

http://www.zen-cart.com/forum/attachment.php?attachmentid=8867&d=1298264134

If I turn off zencarts gzip compression the gibberish dissappears and the correct shows*

as soon as i turn gzipcompression on again the gibberish returns

Is there any way i can decompress the info coming from the "Sidebox Anywhere" mod

*Images are missing but everything else is there

21 Feb 2011, 10:11 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Sidebox Anywhere and gzip compression

Evidently your server can't send gzip-compressed data properly. Maybe it's not configured to be able to do gzip?

21 Feb 2011, 10:44 PM
#3
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Sidebox Anywhere and gzip compression

Can you expand on that, I do not understand

When i test the zencart shop here

http://scrapbookoutletnz.co.nz/shop/

For gzip compression

http://www.whatsmyip.org/http_compression/

It tells me that the store is gzipped

But the page the sidebox is being displayed on is not gzipped.

So if I put this at the top of my non gzipped page

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>

it works
http://scrapbookoutletnz.co.nz/maani2/index6.php

Ok, so that seems to fix it.

So that leaves me with 2 questions

  1. How do i add /shop/ to the imags url so they work without breaking compatibility with image handler
  2. Is there a way to check what would be shown to browsers that don't support compression?