#11600 closed defect (bug) (fixed)
gzuncompress() error on http.php line 1824
Reported by: | ipstenu | Owned by: | |
---|---|---|---|
Milestone: | 2.9.2 | Priority: | normal |
Severity: | major | Version: | 2.9 |
Component: | HTTP API | Keywords: | has-patch |
Focuses: | Cc: |
Description
My error log is FILLED with these, and on ONE of my RSS feeds called via a widget, I get this on my blogs:
PHP Warning: gzuncompress() [<a href='function.gzuncompress'>function.gzuncompress</a>]: data error in /home/domain/public_html/blog/wp-includes/http.php on line 1824
Now the interesting thing is it ONLY shows up when I try and pull in another WP install's RSS as my feed. Both blogs are on the same server, both are on the same version of WP (2.9.1 Beta 1)
PHP 5.2.8 on Apache 2.2.11
Attachments (1)
Change History (21)
#3
@
15 years ago
- Component changed from General to HTTP
can you provide the URL at all for testing purposes? You can send it privately: wordpress@… if you do not wish to publish it.
Are you running any caching plugins?
#4
@
15 years ago
I have it up at http://jorjafox.net/ (you can see it on the sidebar) with the RSS feed pointing to http://jorjafox.net/videos/feed
Let me know if you need anything else :)
#5
@
15 years ago
Let me know if you need anything else :)
Many thanks :) Much easier to reproduce and fix if theres something to test against :) - I also notice you're using the W3 Total Cache
plugin, That could be causing it as well, since it compresses the content.. I'll try that plugin on a working server and see if it causes it for me..
miqrogroove: Could you report those Notice's to another ticket?
#6
@
15 years ago
- Keywords has-patch added
attachment 11600.diff added
It looks like the server in question is sending Deflate'd content, RAW deflated content, Not the Deflate which web servers generally serve up (Crazily enough, they all differ in what data headers and trailing data they send). The thing with Raw deflate is, the initial header is pretty much dependant upon the content, so it cant be tested for in this case by the sounds of it.
Attached patch tries to raw inflate it before attempting other methods..
I've silenced the warnings on the attempts to "try" decompressing the string, as if its not the right function, it'll definately produce an php warning/notice.
Attached patch is actually what is suggested in #11316 too, so will fix that as well.
I'm leaving this set to 2.9.1 as it needs to be fixed there.
#8
@
15 years ago
FWIW, I tried it with and without W3 Total Cache, with the same results. Put in the patch and happiness :)
#9
follow-up:
↓ 10
@
15 years ago
Forgive me if i add my comment here. Today i opened a new ticket (http://core.trac.wordpress.org/ticket/11718) and i was addressed here by dd32.
this issue has bothered me since wp 2.8. a few minuted ago i tried to implement, after i upgraded to wp 2.9.1 the fix but it still gives me the errors:
Downloading update from http://wordpress.org/wordpress-2.9.1.zip.
Unpacking the update.
Verifying the unpacked files
Installing the latest version
Upgrading database
Warning: gzinflate() [function.gzinflate]: data error in /xxx/xxx/public_html/wp-includes/http.php on line 1855
Warning: gzuncompress() [function.gzuncompress]: data error in /xxx/xxx/public_html/wp-includes/http.php on line 1824
WordPress upgraded successfully
i forgot to mention that i also use (apart the plugin i mentioned in the other ticket) Xcache and i m on bluehost.
how serious is this error and why i cant resove it??? do i still have to manually upgrade or despite these errors the upgrade was succesfully??
thanks and sorry again!
#10
in reply to:
↑ 9
@
15 years ago
Replying to france1972:
how serious is this error and why i cant resove it??? do i still have to manually upgrade or despite these errors the upgrade was succesfully??
Not serious at all. Just ignore it for now. You dont need to manyually upgrade anything, WordPress will prompt you to if need be.
#11
@
15 years ago
Thanks dd32 for your kindness and your prompt reply! since i am not an expert i just wanted to tell you that i only implemented this fix on http.php:
if ( false !== ($data = gzinflate($gzData)))
return $data;
is this what you meant??
#12
@
15 years ago
No. Just leave it as it is and live with it for now. You shouldnt see it again. It'll get fixed in the next release.
If you want to change it, You can change the functions to these:
function decompress( $compressed, $length = null ) { if ( false !== ($decompressed = @gzinflate( $compressed ) ) ) return $decompressed; if ( false !== ( $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ) ) ) return $decompressed; if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) ) return $decompressed; if ( function_exists('gzdecode') ) { $decompressed = @gzdecode( $compressed ); if ( false !== $decompressed ) return $decompressed; } return $compressed; }
and
function compatible_gzinflate($gzData) { if ( substr($gzData, 0, 3) == "\x1f\x8b\x08" ) { $i = 10; $flg = ord( substr($gzData, 3, 1) ); if ( $flg > 0 ) { if ( $flg & 4 ) { list($xlen) = unpack('v', substr($gzData, $i, 2) ); $i = $i + 2 + $xlen; } if ( $flg & 8 ) $i = strpos($gzData, "\0", $i) + 1; if ( $flg & 16 ) $i = strpos($gzData, "\0", $i) + 1; if ( $flg & 2 ) $i = $i + 2; } return @gzinflate( substr($gzData, $i, -8) ); } else { return false; } }
#13
@
15 years ago
I will leave it like that. (i am too scary to make those changes) I will wait for the official fix implemented in the next wp release! However thanks for your great kindness! Have a great 2010 :)
Frank
#16
@
15 years ago
- Milestone changed from 3.0 to 2.9.2
This also deserves to go into the 2.9 branch.
Its a regression from a previous state. In 2.8, This added functionality was the only available, in 2.9 we moved to the compatible version which seemed to work on everything tested with. But seems some do return raw-inflated content (which previously worked) which doesnt seem to work with the code in the compatible function.
While attempting to reproduce this using 2.9 RC-1: