Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with zlib output compression'
Solution 1
You should check if the zlib library loaded then clean the turn off output buffering by doing ob_end_clean()
You can add this line in the top of your file :
<?php if (extension_loaded('zlib')){ ob_end_clean(); ob_start('ob_gzhandler');} ?>
Solution 2
Search line below in your php.ini file:
zlib.output_compression = On
change for:
zlib.output_compression = Off
CodePlateau
• Leads a talented team of 15+ individuals at CodePlateau. • Successful collaboration with 200 + clients in 2018. • 9+ years of experience in open source web programming framework using PHP. • Expert understanding of client requirements and functional specifications. • Develops and maintains dynamic websites, server-side APIs, and web applications. • Established a company work culture of documenting, segregating and prioritizing client requirements. • Expert coordination with development and test teams for project clarity and functionality.
Updated on July 26, 2022Comments
-
CodePlateau almost 2 years
i am using the Gzip commpressionand Zlib commpression to speed up my website
I have used below code
ob_start("ob_gzhandler");
in common file that are include on all pages andlib.output_compression = On
But after this i get the error like
"Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with 'zlib output compression' in E:\xampp\htdocs\projects\trunk\index.php on line 2"
Can any one suggest me what's wrong in it?
-
rubo77 about 3 yearswouldn't that be bad for your internet traffic? It would stop compressing the output and using more bandwidth