Opened 18 years ago
Closed 18 years ago
#4426 closed defect (bug) (fixed)
trouble with feedburner + gzip
Reported by: | werwin | Owned by: | westi |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.2.1 |
Component: | General | Keywords: | feedburner gzip has-patch |
Focuses: | Cc: |
Description
I'm running 2.2.1-RC1
When having Gzip enabled in Wordpress (Options -> Reading -> WordPress should compress articles (gzip) if browsers ask for them -> Checked), the feeds for FeedBurner will stop working.
Turned Gzip on, example from FeedBurned page (was just working):
XML Parsing Error: not well-formed Location: http://feeds.feedburner.com/willerwin Line Number 1, Column 1:? ^
On the administration page when logged into FeedBurner, I'm told:
The URL you entered does not appear to be a valid feed. We encountered the following problem: Your server is sending us some non-XML data. This is usually caused by your blogging platform or server generating an error page that is not in a valid feed format (usually it is plain-text, or HTML). Please confirm that you source feed is working properly.
When validating the feed (just show you can see how it's showing up on http://feedvalidator.org, I get this:
Sorry This feed does not validate. * line 1, column 2: 'utf8' codec can't decode byte 0x8b in position 1: unexpected code byte (maybe a high-bit character?) [help] ?������?T??<[_?Q?^Z?~???-?zrP??L?" ^ * line 1, column 0: XML parsing error: <unknown>:1:0: not well-formed (invalid token) [help] ?������?T??<[_?Q?^Z?~???-?zrP??L?" In addition, this feed has an issue that may cause problems for some users. We recommend fixing this issue. * "text/xml" media type is not specific enough [help] Source: http://www.willerwin.com/wp-feed.php 1. ?������?T??<[_?Q?^Z?~???-?zrP??L?" 2. ???J??4=.???? 3. vh?4z ???P?&?:??w?????"??M????t?M???]?C?"Z?* HA?85ڣ??546g????? 4. ;YǬ?ǪP???f>6??/n>?S&K*???ܸ? ?????P?I=LM??+??D?U 5. +b?k? ??K??2@,??a?+?o??ģXm?0??=????? я?H?.???6?f?ݼ??? \??r???0 ??G????E???u?xz??V༥q?????;??4(?? 6. ?6 ???-??x?{???Hw??H?Ҝ???RJT?????o˴>??? ?đ???h???X?(?u~1??f4c?????/η?S "8?.{|L?kČ?|Q?6? ??D???~��??�[3Fi��
When Gzip in wordpress is disabled, FeedBurned support works.
BUT
While having Gzip ON, and not using FeedBurner and using the built-in Wordpress feed (http://www.willerwin.com/wp-feed.php), the Feed shows up properly.
Attachments (2)
Change History (21)
#3
in reply to:
↑ description
;
follow-up:
↓ 4
@
18 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
I turned off these setting in Apache, since you said it might be a server issue.
#AddEncoding x-gzip .gz .tgz #LoadModule deflate_module libexec/apache22/mod_deflate.so #LoadModule mime_module libexec/apache22/mod_mime.so
I then turned on the Wordpress gzip compression and tried FeedBurner again, still getting the error of "The URL you entered does not appear to be a valid feed." The feed works when Wordpress gzip is turned off - the apache settings do not matter.
So the output doesn't look like it's getting double zipped since I turned off those Apache settings.
#4
in reply to:
↑ 3
;
follow-up:
↓ 7
@
18 years ago
Replying to werwin:
I turned off these setting in Apache, since you said it might be a server issue.
#AddEncoding x-gzip .gz .tgz #LoadModule deflate_module libexec/apache22/mod_deflate.so #LoadModule mime_module libexec/apache22/mod_mime.soI then turned on the Wordpress gzip compression and tried FeedBurner again, still getting the error of "The URL you entered does not appear to be a valid feed." The feed works when Wordpress gzip is turned off - the apache settings do not matter.
So the output doesn't look like it's getting double zipped since I turned off those Apache settings.
Ok.
I assume this is how your server is currently setup: WordPress gzip disabled, apache zip disabled.
I have looked again at the output and it is still gzip encoded so I guess something else is still compressing it which will again lead to double compression if you enable the WordPress option.
I guess you may have "zlib.output_compression" enabled in php.ini or apache config for php?
#5
@
18 years ago
I say this has to be a configuration problem on your end, somehow, somewhere. Why? Because I'm using GZIP compression and Feedburner and it worksforme.
Might consider posting in the support forums, maybe somebody there has encountered the issue before.
#7
in reply to:
↑ 4
@
18 years ago
Replying to westi:
I guess you may have "zlib.output_compression" enabled in php.ini or apache config for php?
In php.ini I do have:
zlib.output_compression = On zlib.output_compression_level = 5
Isn't that default in php.ini to have compression turned on though?
Otto42: Do you have compression turned on in your php?
#8
@
18 years ago
You were correct with the PHP settings.
Keeping those Apache settings (specified above) turned on, and turning off the zlib.output_compression PHP setting fixed the problem.
I guess Wordpress was trying to double compress everything.
Can a patch be added to the trunk that checks to see that zlib.output_compression is off, before allowing the option in Wordpress to gzip content?
#11
@
18 years ago
- Keywords reporter-feedback added
werwin please test the attached patch to see if this fixes your issue.
It should allow you to enable gzip compression with it also enabled in php.ini and only get singly compressed output.
#12
@
18 years ago
Patched successfully (latest 2.2.1 svn)
Turned PHP gzip compression on.
Wordpress compression off.
- Feeds work.
Turned Wordpress compression on.
- Feeds do not work - same problem as original post.
#13
follow-up:
↓ 14
@
18 years ago
There are a few typos in the patch, Westi.
if ( (ini_get('zlib.output_compression') == 'On') || ini_get('zlib.output_compression' > 0 )) return false;
should be:
if ( (ini_get('zlib.output_compression') == 'On') || ini_get('zlib.output_compression_level') > 0 ) return false;
werwin, can do do:
<?php var_dump(ini_get('zlib.output_compression')); var_dump(ini_get('zlib.output_compression_level')); var_dump(ini_get('output_handler')); ?>
and then paste the output here?
#14
in reply to:
↑ 13
@
18 years ago
Replying to markjaquith:
werwin, can do do:
<?php var_dump(ini_get('zlib.output_compression')); var_dump(ini_get('zlib.output_compression_level')); var_dump(ini_get('output_handler')); ?>and then paste the output here?
Sure,
string(1) "1" string(1) "5" bool(false)
We use ob_gzhandler to handle the compression of output and that handles deciding if the client supports it.
It looks like either feedburner is sending the wrong headers and is getting gzip encoded data it doesn't expect or you are double zipping your output (for example if apache is also configured to compress output) and that is confusing all clients except the browser.
Looking at your current setup at www.willerwin.com which validates at feedburner so I assume has gzip turned off in WordPress you output is being gziped presumable by the webserver itself.