Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with zlib output compression'

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 and

lib.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?

like image 389
CodePlateau Avatar asked Feb 26 '13 06:02

CodePlateau


2 Answers

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');} ?>

like image 131
ybenhssaien Avatar answered Nov 15 '22 17:11

ybenhssaien


Search line below in your php.ini file:

zlib.output_compression = On

change for:

zlib.output_compression = Off

like image 37
Janderson Silva Avatar answered Nov 15 '22 16:11

Janderson Silva