WordPress.org

Support

Support » Alpha/Beta » [3.0 RC1] ob_start(‘ob_gzhandler’) No Longer Works in My Theme Header

[3.0 RC1] ob_start(‘ob_gzhandler’) No Longer Works in My Theme Header

  • magblogapi
    Member

    @magblogapi

    I use output buffering with the GZIP handler to compress my output.

    I have always had it in the theme header/footer.

    In 3.0, it has stopped working (sends junk to the browser).

    That means that it is wrapped in ob_ calls.

    At first glance, I can’t find these calls. I ended up hacking the main index.php file to add these (YUCK).

    Can anyone tell me where they added the ob_ calls?

Viewing 3 replies - 1 through 3 (of 3 total)
  • magblogapi
    Member

    @magblogapi

    Just FYI. I simply added the GZIP stuff to the .htaccess, which is OK for the site I’m working on, but is not a particularly portable solution, and can get whacked by upgrades easily. At least the core didn’t get hacked.

    I’d love any feedback on workarounds.

    I’m having a problem with this as well with my plugin. For some reason I never noticed it on my WordPress site, but now that I’m working on a clean 3.1 install, this error is presenting itself. Did you have any luck figuring this out?

    I ended up figuring out what was wrong with my setup. I had my ob_start() within a “get_header” action hook callback, and my theme didn’t make use of a header.php file

    As for your issue, it’s clear to me now that it’s different than mine. Nested output buffers are allowed, but if an outer buffer ends up working with a gzip, things could get messed. How and when are you initiating your output buffer? With the right hook, you could get it to start before anything in index.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[3.0 RC1] ob_start(‘ob_gzhandler’) No Longer Works in My Theme Header’ is closed to new replies.