In my PHP 5.4.x setup, an old project which uses ob_start() and ob_whatever() started to throw errors like
Warning: ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression'. On my development environment, I suppress this error by disabling zlib compression on this specific vhost.
Below is the full error message I get.
Warning: ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /home/lysender/projects/foo/bar/index.php on line 6 Notice: ob_start(): failed to create buffer in /home/lysender/projects/foo/bar/index.php on line 6
After a quick research, I got a hint that disabling the zlib compression will suppress this error. Since I’m on a vhost, I can just disable this zlib compression only in this specific project. Therefore firing up vim, I added this line on my vhost definition.
... php_value zlib.output_compression off </VirtualHost>
Then restarted apache, then the warning is gone.
I haven’t experienced this much problem when I’m using PHP 5.3.x and even the early PHP 5.4.x on my Linux distro. Maybe something has changed that made this warning cry wolf.