Forked from loorlab/disable_zlib.output_compression
Created
December 13, 2016 12:13
-
-
Save darkodemic/7576bfd27efd51ea6a30b9607e71ffeb to your computer and use it in GitHub Desktop.
Disable zlib.output_compression on WordPress : Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /path/wp-includes/functions.php on line 3282 via https://core.trac.wordpress.org/ticket/18525
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOLUTIONS I have came across so far: | |
======================== SOLUTION 1 ==================== | |
In plugins (or somewhere) you probably have this code: | |
ini_set('zlib.output_compression', '1'); | |
so, I replaced that code with | |
if (!is_admin()) ob_start('ob_gzhandler'); //because, in admin pages, it causes plugin installation freezing | |
and Compression will be remained still ON. | |
======================== SOLUTION 2 ==================== | |
You may have to use: | |
remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment