Php Gzinflate Data Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more
Gzinflate(): Data Error Wordpress
about Stack Overflow the company Business Learn more about hiring developers or posting gzinflate online ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Gzinflate Php
Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP Warning: gzinflate(): data error in up vote 0 down vote warning: wp-includes\class-wp-http-encoding.php:58 - gzinflate(): data error favorite I pack my code using gzdeflate(), after I do addslashes() and write it to file like $var ='MY_RESULT'; After it I try to execute it using eval(stripslashes(gzinflate($var))) and get error Warning: gzinflate(): data error in this row. If I set $var = addslashes(gzdeflate("my_original_code")) everything work nice, but I need to put deflated result in this variable. So where is my mistake? Here is my code:
a New Ticket Search: LoginNotifications Context Navigation ← Previous TicketNext Ticket → Opened 4 years ago Closed 3 weeks ago #22952 closed defect (bug) (duplicate) WP_HTTP can cause PHP Warnings during attempted decompression Reported by: dd32 Owned by: Milestone: Priority: normal Severity: normal Version: 3.3 Component: HTTP API Keywords: has-patch needs-testing Focuses: Cc: Description (last modified by SergeyBiryukov) WARNING: wp-includes/class-http.php:1656 - gzinflate(): data error WP_Http_Encoding can cause PHP Warnings when it attempts to decompress data using gzinflate() which has been encoded in any way. We http://stackoverflow.com/questions/26316521/php-warning-gzinflate-data-error-in currently work around this this in a few ways, but we still take a "try it and see" method instead of detecting the compressed contents signature and handling it appropriately. Attached is a first-run patch at detecting Huffman coding, which is what we currently use @gzinflate( substr( $gzData, 2 ) ) for (and hey, who doesn't like making https://core.trac.wordpress.org/ticket/22952 magic numbers clearer?) I have been running a similar patch on WordPress.com and gathering data on how the myriad of different Web Servers out there respond, and so far this causes it to correctly identify the vast majority of responses. It appears that we may also be attempting to decompress compressed files retrieved through WP_HTTP on some poorly configured servers, but this is something I haven't yet traced properly. Attachments (3) 22952.diff (2.2 KB) - added by dd32 4 years ago. 22952.2.diff (2.2 KB) - added by dd32 4 years ago. 22952.3.diff (4.6 KB) - added by dd32 2 years ago. Download all attachments as: .zip Oldest first Newest first Threaded Comments only Change History (41) @dd32 4 years ago Attachment 22952.diff added #1 @SergeyBiryukov 4 years ago Description modified (diff) #2 @dd32 4 years ago I have also considered that we're using gzinflate() completely wrong, for example: gzencode() == gzip gzcompress() == zlib (aka. HTTP deflate) gzdeflate() == *raw* deflate encoding Currently we use gzinflate() (the raw DEFLATE standar
Contact Work with us The Hub Log In Become a member New to the community? Start here Home Support Support https://premium.wpmudev.org/forums/topic/im-seeing-the-following-php-warning-in-the-debug-bar Forums Plugins & themes WP Smush Pro Dave Regular Joe 50 pts 6 pts LEVEL 0 I'm seeing the following PHP warning in the Debug bar: I'm seeing the following http://wordpress-hackers.1065353.n5.nabble.com/gzinflate-Warning-on-transient-expiration-td40201.html PHP warning in the Debug bar: WARNING: wp-includes/class-http.php:2116 - gzinflate(): data error require_once('wp-admin/admin.php'), require_once('wp-admin/admin-header.php'), do_action('admin_print_scripts-media_page_wp-smush-bulk'), call_user_func_array, WpSmushitAdmin->enqueue, WpSmushitAdmin->localize, WpSmush->is_pro, wp_remote_get, WP_Http->get, WP_Http->request, WP_Http->_dispatch_request, WP_Http_Curl->request, WP_Http_Encoding::decompress, gzinflate Here's a screenshot: https://docs.google.com/file/d/0BzUoVReonWCNUlJFdFNmNjJVcWs/edit data error This warning doesn't appear to be causing any real problem as the smushing appears to be working. But, since it's a PHP warning I figured I would post about it anyway. More WP Smush Pro discussions WP Smush Pro All General WordPress Plugins & Themes Multisite Features & Feedback Comment 1 Jude Air Support 1,053 pts 10,322 pts LEVEL 28 Hi gzinflate(): data error there @Dave Hope you had a great weekend. Nothing to worry, its just the order in which the gzinflate function is called that seems to have triggered this. As you said the Smushing itself will work just fine. Jude FREE WordPress Tutorials, Tips and Tricks Subscribe JOIN 440476 HAPPY MEMBERS We pride ourselves on our level of customer support and responsiveness to member requests. Your WordPress experience will never be the same Start free trial ABOUT SSL CERTIFICATES Plugins Hummingbird Defender Hustle Snapshot More... Themes Upfront Builder Spirit Luke & Sara Parrot More... Resources 24/7 Support Academy Jobs & Pros Blog Kinsta Managed Hosting Review: Blazingly Fast and Solid Features WordPress Careers Masterclass: How to Forge a Successful Career How We've Made Website Monitoring Easy with The Hub More... Contact The Team Privacy Terms © 2004-2016 WPMU DEV - Project by Incsub 24/7 Unlimited Expert WordPress Support Being a WPMU DEV member is like having your own WordPress support team - along with 350+ awesome plugins, themes and videos. Find out more Get the tips and resources all the WordPress professional
| Report Content as Inappropriate ♦ ♦ gzinflate Warning on transient expiration Hey guys, I'm running into a frustrating issue where I'm getting a gzinflate Warning on the first page load after transient(s) holding remote GETs have expired. This is the error: WARNING: wp-includes/class-http.php:1654 - gzinflate() [function.gzinflate]: data error I'm working with a method that pulls data via wp_remote_get() from various sites based on the value of a post meta key. When the transient(s) have expired I can see the transient has been set again, but it throws the warning on the first page load. Refreshing the page clears the warning and displays the value(s) of the transients. This happens every time the transients expire. So two questions: 1) Should I not be caching inside the method and if not, what are my alternatives? 2) If the caching doesn't seem to be to blame, how do I overcome the warning when transients are reset? This is the block I'm concerned with: $cached = get_transient( $meta->_stats_type . '-count' ); if ( false == $cached ) { $count = number_format( stats_count( $meta->_stats_type ), 0, '', ',' ); set_transient( $meta->_stats_type . '-count', $count, 3600 ); } return $cached; Also, if it makes a difference, I'm working on localhost. Drew -- _______________________________________________ wp-hackers mailing list [hidden email] http://lists.automattic.com/mailman/listinfo/wp-hackers Dion Hulse (dd32) Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: gzinflate Warning on transient expiration Hi Drew, The gzinflate error isn't coming from the Transient API, It's coming from the WP_HTTP API, the one retrieving the remote document. The reason you've started seeing it now, may be because you've upgraded a PHP version, or the remote server has changed their environment - I'm not sure, but I've started seeing the warning myself a lot in the last few days and haven't had a chance to track down what changed. So it's not a code error on your behalf at all. The cause comes from WP_HTTP_