Skip to content


Fixing an ob_start() ob_gzhandler issue in Carrington Blog theme

I’m currently using the Carrington Blog theme, although now that I’ve had a look at their official site they seem a bit abandoned, and I just noticed the following errors in the server log:

[Wed Jul 25 07:55:49 2012] [error] PHP Warning:  ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression' in wp-content/themes/carrington-blog/css/css.php on line 50
[Wed Jul 25 07:55:49 2012] [error] PHP Notice:  ob_start(): failed to create buffer in wp-content/themes/carrington-blog/css/css.php on line 50

A search on those didn’t really bring me many results, non of which WordPress-related, so I had to figure it out myself.

Basically, on line 50 of this css.php file, you have this:
ob_start("ob_gzhandler");
So, it tries to start a compressed buffer, but since compression is already enabled somehow (might be in my php.ini file) it throws an error. Which, on a side note, causes the CSS to be a bit messed up (which is visible on some pages that then gain a blank margin all around the body. I guess a first fix could be to replace this with ob_start();. I didn’t try this, I directly went to the more aggressive idea of just removing the buffering (so, commenting this line), which doesn’t seem to cause any issue and works fine to remove the error. So, fixed 🙂

Posted in web development.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA