Title: PHP Fatal error:  Unknown: Cannot use output buffering
Last modified: August 31, 2016

---

# PHP Fatal error: Unknown: Cannot use output buffering

 *  Resolved [Draikin](https://wordpress.org/support/users/draikin/)
 * (@draikin)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/)
 * I’m getting a HTTP Error 500 after activating the Cache Enabler plugin. Nginx
   logs show the following error:
 * > PHP message: PHP Fatal error: Unknown: Cannot use output buffering in output
   > buffering display handlers in Unknown on line 0
 * I read about conflicts with Autoptimize and other minification plugins causing
   this problem, but I’ve tried disabling all other plugins, but even Cache Enabler
   alone still gives me this error. I used WP Super Cache + Autoptimize before attempting
   to switch to Cache Enabler. Any clues as to what may be causing this?
 * One more note: before getting this error, the plugin didn’t work either but gave
   a different error that I managed to resolve. It didn’t have permission to write
   in the wp-content/cache folder, but (unlike other plugins) it didn’t point out
   that problem in the settings. Perhaps such a check could be added?
 * [https://wordpress.org/plugins/cache-enabler/](https://wordpress.org/plugins/cache-enabler/)

Viewing 15 replies - 1 through 15 (of 23 total)

1 [2](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/page/2/?output_format=md)

 *  [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382583)
 * [@keycdn](https://wordpress.org/support/users/keycdn/); I’m Autoptimize’s developer,
   cache enabler + autoptimize seems like a great combination (as cache enabler 
   doesn’t do extensive CSS/JS optimization)! So let me know if I can assist to 
   make (or confirm) compatibility! 🙂
 * frank
 *  [Brian Jackson](https://wordpress.org/support/users/brianleejackson/)
 * (@brianleejackson)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382704)
 * Thanks for the input Frank. I use Autoptimize along with Cache Enabler on several
   of my sites. Including, [https://perfmatters.io/](https://perfmatters.io/). I
   have not run into the buffering issue before, so not sure if it is Cache Enabler
   or a possible conflict?
 * Have you tried disabling all other plugins and running just Autoptimize and Cache
   Enabler to see what happens?
 * Also whenever I see a buffer error in PHP I always recommend checking your PHP
   memory allocation size. Depending on your web host, it could be set too low. 
   Also, I’m assuming you are using at least PHP 5.3?
 *  Plugin Author [KeyCDN](https://wordpress.org/support/users/keycdn/)
 * (@keycdn)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382716)
 * Is the Cache Minification disabled in the Cache Enabler settings?
 * We haven’t see any conflict with Autoptimize and Cache Enabler.
 * [@frank](https://wordpress.org/support/users/frank/): Would you mind to test 
   the plugins on your end as well?
 *  Thread Starter [Draikin](https://wordpress.org/support/users/draikin/)
 * (@draikin)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382718)
 * Cache Minification is indeed disabled. Given that disabling all other plugins
   doesn’t resolve the issue, I’m assuming Autoptimize has nothing to do with this.
   The thing is that the error message doesn’t really tell me anything about where
   it’s failing, and the WordPress debug log doesn’t seem to offer any information
   either.
 *  [Brian Jackson](https://wordpress.org/support/users/brianleejackson/)
 * (@brianleejackson)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382727)
 * Have you tried switching to one of the default WordPress themes to see if you
   still encounter the same error?
    Do you know what your PHP memory value limit
   is on your server?
 * Thanks
 *  [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382733)
 * [@draikin](https://wordpress.org/support/users/draikin/): nothing in your php
   errorlog?
    [@keycdn](https://wordpress.org/support/users/keycdn/); will try to
   test tomorrow
 * frank
 *  Thread Starter [Draikin](https://wordpress.org/support/users/draikin/)
 * (@draikin)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382742)
 * [@frank](https://wordpress.org/support/users/frank/): I think the Nginx log is
   where the PHP errors are logged? The error I’m getting is in the first post, 
   usually you get a more detailed error (which PH file and line number) but this
   isn’t giving me any more details. I’m using PHP 7.0 by the way.
 * PHP memory limit: I tried setting it to 64MB since that’s indeed often associated
   with this problem, but it didn’t make a difference.
 * Switching themes: I can’t easily test that at the moment, but I’ll look into 
   that.
 * Thanks for the help so far!
 *  Thread Starter [Draikin](https://wordpress.org/support/users/draikin/)
 * (@draikin)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382744)
 * I tried using the TwentyTwelve theme, but I’m encountering the same problem. 
   But I did notice that the first page load appears to work. The second one just
   gives me a white screen. In the error log, I’m now noticing a different PHP warning:
   it’s failing with ” No such file or directory” on /wp-content/plugins/cache-enabler/
   inc/cache_enabler_disk.class.php on line 212, which tries to read the cached 
   file from the disk.
 * The only problem is, there’s no cached file. There’s not even a /wp-content/cache/
   cache-enabler/ directory. I’m not sure why, as it should have enough rights to
   write to that folder. Both WP Super Cache and Autoptimize can write to the cache
   directory, after all. And it’s the only error I’m seeing, I would expect some
   error related to writing the file prior to failing to retrieve it. So it’s like
   it’s not even trying to create the cached version.
 *  Plugin Author [KeyCDN](https://wordpress.org/support/users/keycdn/)
 * (@keycdn)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382752)
 * Ok, so the first problem is related to the theme. What theme are you using?
 * Please delete the Cache Enabler completely and install it again. Try it again
   with the TwentyTwelve theme.
 *  [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382754)
 * [@draikin](https://wordpress.org/support/users/draikin/); location of your php-
   error-log is set in your php.ini. could be the nginx-log, could be elsewhere 
   🙂
 * [@keycdn](https://wordpress.org/support/users/keycdn/); tested CacheEnabler +
   AO on Apache+PHP7 (on Ubuntu) and all seems well at first sight. It would be 
   nice if you (as [some other page cache plugins already did](http://blog.futtta.be/2016/02/20/hyper-cache-hooking-up-with-autoptimize/))
   could hook into AO’s `autoptimize_action_cachepurged` action to automatically
   clear CE’s cache if AO’s get purged (this helps users avoid having pages in page
   cache which refer to autoptimized CSS/JS that was removed)?
 * frank
 *  [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382755)
 * [@keycdn](https://wordpress.org/support/users/keycdn/): Additionally, if AO is
   active, the HTML & Inline JS minification might cause problems, so testing for
   AO being active and warning users (or even disabling those options) might prove
   useful?
 *  Plugin Author [KeyCDN](https://wordpress.org/support/users/keycdn/)
 * (@keycdn)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382778)
 * [@frank](https://wordpress.org/support/users/frank/): Thanks a lot for testing.
   Just added the hook for Autoptimize and it works perfectly! 🙂 Would be nice 
   if you can add the Cache Enabler on your plugin page. We are going to add a section
   with confirmed compatible plugins as well.
 *  Thread Starter [Draikin](https://wordpress.org/support/users/draikin/)
 * (@draikin)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382792)
 * I made a completely separate test version based on a backup from the website,
   and there I can get Cache Enabler to work (also with Autoptimize), on my standard
   theme (child theme for Twenty Twelve). Which is actually annoying since I’m still
   not sure what’s causing the problem on the live website, and I can’t really afford
   to test it thoroughly there, so I might have to stick with WP Super Cache.
 * The main reason I actually wanted to try Cache Enabler is to see if I could pre-
   compression to work, and unfortunately I’m encountering the same problem there
   as with WP Super Cache. Enabling it on the test website also causes content decoding
   errors in the browser, despite the fact that I set “gzip_static on” in the nginx
   config file. I’m guessing it must be related to my Nginx config file somehow.
 *  Plugin Author [KeyCDN](https://wordpress.org/support/users/keycdn/)
 * (@keycdn)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382795)
 * Pre-compression issues are not related to nginx but rather to PHP and the installed
   gzip library. I’m sorry that we cannot replicate your issue but feel free to 
   provide more details in case you discover something.
 *  [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/#post-7382800)
 * [@keycdn](https://wordpress.org/support/users/keycdn/); I’ll do a quick blogpost
   on keycdn’s cache enabler 🙂
 * what do you think about:
 * > if AO is active, the HTML & Inline JS minification might cause problems, so
   > testing for AO being active and warning users (or even disabling those options)
   > might prove useful?

Viewing 15 replies - 1 through 15 (of 23 total)

1 [2](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/page/2/?output_format=md)

The topic ‘PHP Fatal error: Unknown: Cannot use output buffering’ is closed to new
replies.

 * ![](https://ps.w.org/cache-enabler/assets/icon.svg?rev=2442383)
 * [Cache Enabler](https://wordpress.org/plugins/cache-enabler/)
 * [Support Threads](https://wordpress.org/support/plugin/cache-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/cache-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cache-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cache-enabler/reviews/)

 * 23 replies
 * 4 participants
 * Last reply from: [KeyCDN](https://wordpress.org/support/users/keycdn/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/php-fatal-error-unknown-cannot-use-output-buffering/page/2/#post-7382842)
 * Status: resolved