Support » Plugin: W3 Total Cache » Should I be worried? Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback()

  • Resolved brau0153


    Pretty much all my pages are showing this error:

    Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in /home/xxxxxxxx/public_html/wp-includes/functions.php on line 3464

    The bold line highlighted below is the line in question:

     * Flush all output buffers for PHP 5.2.
     * Make sure all output buffers are flushed before our singletons are destroyed.
     * @since 2.2.0
    function wp_ob_end_flush_all() {
    	$levels = ob_get_level();
    	for ($i=0; $i<$levels; $i++)
    <strong>		ob_end_flush();</strong>

    I haven’t found anything in this forum relating to this problem and researching on Google has only come up with other websites who are showing this same error as opposed to results containing any actual discussion or solutions to this issue. Any insight or ideas on how to fix this problem would be greatly appreciated 🙂

    Thanks in advance,

Viewing 10 replies - 1 through 10 (of 10 total)
  • I posted the fix for this several times already in this forum but it seems to be buried 🙁 . Sounds like you’re using php 7? If so you will need to adjust the ob_callback() function header’s parameter to remove the ampersand (&). It’s been a while but i believe it is in the TotalCache.php file. Give it a try.

    Thanks for responding. I’m using php 5.5.31, do you think the same fix will work? Also, if possible can you include a link for your previous post?

    For those of you who need this in the future…

    Kimberly pointed me in the right direction and here is how to fix this issue:

    Find this folder in your Cpanel


    Then find this function

    function ob_callback(&$buffer) {

    For me it was on line 512 and was coded as such

    * @param string $buffer
          * @return string
        function ob_callback(&$buffer) {
             global $wpdb;
             if ($buffer != '') {

    All you need to do is delete the ampersand (&)
    When finished it looks like this

    * @param string $buffer
          * @return string
        function ob_callback($buffer) {
             global $wpdb;
             if ($buffer != '') {

    Now you’re all set 🙂

    PS Don’t forgot to backup just in case

    Thanks Kimberly and Adam! That seemed to do the trick for me, too. Since the path and filename are split across two posts above: here’s the full path/file:

    … /wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php

    Oops, sorry about that. Thanks for the correction.

    There is another better fix -> Uninstall W3 Total Cache. And this error will disappear. I did it, worked perfectly.

    Reason why I did it:
    1. With next update you will have that error back!
    2. They had enough time to fix it and send out new update to fix it. Since they have not did that, means that there may be much much worse problems, lots’ of bad code.

    Thanks a lot for the Fix with the &, had the same error.

    It’s still not fixed..?

    I agree with edragonxx. Uninstalling W3 TC is the best solution. This plugin has not been supported for quite some time. Last year I purchased a support ticket. Despite numerous attempts to contact them, no one every responded. I uninstalled W3TC and moved to WPEngine. The only reason I am back today is because they charged my credit card for an annual subscription. Of course, when I called the billing phone number, no one answered. Apparently, the only thing this company can do is charge credit cards.

    This is a bad solution due to it not being future-proof and unless you know the internal workings of the entire plugin this could cause unwanted side effects.

    There is an obvious incompatibility with PHP 7 and I’m not sure if the authors are still working on this as it is a 5 second patch.

    Could an author please jump in on these to advise?

    All the best

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Should I be worried? Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback()’ is closed to new replies.