RSS Feed not working with Gzip compression

Found a bug? Tell us!!
Post Reply
Hathor
Regular
Posts: 118
Joined: Tue Mar 22, 2005 11:48 pm

RSS Feed not working with Gzip compression

Post by Hathor »

I have two S9 blogs. One of them (http://bluemushrooms.com) works just fine with gzip compression turned on in the config panel.

The other one (http://thehathorlegacy.info) works with compression turned on, BUT the feed comes up invalid with an error of:
#

line 1, column 0: Undefined root element: br [help]

<br />

#

line 2, column 0: XML parsing error: <unknown>:2:0: junk after document element [help]

<b>Warning</b>: ob_start(): output handler 'ob_gzhandler' cannot be used af ...
That's from FeedValidator.org. Any idea what the issue is, or how to fix it? The feed still works in some readers, but not in Bloglines, for example.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: RSS Feed not working with Gzip compression

Post by garvinhicking »

Yes, this is a very strange issue with certain Apache/PHP configurations.

The only solution I've yet seen is to disable gzip compression.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hathor
Regular
Posts: 118
Joined: Tue Mar 22, 2005 11:48 pm

Post by Hathor »

It doesn't make sense, though. I've had the problem with the same blog on three different hosts.

The other blog has also been on 2-3 hosts, and never had the problem. And the new host for the blog that's having the problem is Site5, who has a lot more expertise in setting up their servers than other hosts I've worked with. So I find it hard to imagine it's the hosts and not the S9 install itself.

Could it be anything else causing the problem? What files in the S9 download affect this? Maybe I've done something wrong.

I really want to use compression, because it definitely loads the pages faster.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

No, you are right, it is a Serendipity problem. But it only shows up in certain configs where PHPs output buffering is globally enabled.

The point is that I am not into the gzip compression think. I for myself think it should be left up to mod_gzip to do this, and not in PHP userscape. Tom Sommer has contributed the gzip compression code and has not yet had time to properly fix it to work in all environments.

If someone has experience with the output buffering, the specific places where Serendipity uses them is in include/functions.inc.php, serendipity_gzCompression() - maybe other function calls are needed?!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hathor
Regular
Posts: 118
Joined: Tue Mar 22, 2005 11:48 pm

Post by Hathor »

Oh, okay. I understand a little better now. :) Thanks for explaining.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I hope we do get the issue fixed, the current method (turning it off) defininetly is only a workaround :(

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hathor
Regular
Posts: 118
Joined: Tue Mar 22, 2005 11:48 pm

Post by Hathor »

Hey, overall S9 is still yards above any other blogging software I've tried. I'm confident it's just going to keep improving. :)
Post Reply