Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
\nWarning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in /wp-includes/functions.php on line 3269
- Loading branch information
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fixed it for me. thank you!
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still in the newest version!
v 0.9.4.1 from wordpress.org
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikaoras how can the plugin author miss this one? this ridiculous bug prevents php7 migration
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MattyLB I see, so which plugin that enables object/page cache do you suggest ?
While PHP7 dramatically increases performance, Page Caching is still very useful.
And Varnish is way more complicated to setup than W3TC
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found this with Google, it indeed fixes this plugin in PHP 7. Maybe the devs didn't see it? The repo does mention: "Unofficial mirror repository; no pull requests, please."
Sent them an email today, will see what they have to say. For now: thanks @gadelkareem!
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tralapo there's an issue about PHP7 in their support forum and PHP7 RCs are out since months now :(
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@younes0 php7 really sent A LOT OF RCs
and put out the stable version in a hurry
can't imagine is there still some problems in current version
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its starting to get annoying that I have to update the /w3-total-cache/lib/W3/Plugin/TotalCache.php file and replace
function ob_callback(&$buffer)
with
function ob_callback($buffer)
every time there is an update across multiple sites which are running on hhvm.
Going to create a sed or diff-patch script now.
-Update-
Command to replace
function ob_callback(&$buffer)
withfunction ob_callback($buffer)
sed -i.bak 's/function ob_callback(&/function ob_callback(/g' /path/to/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php
You can skip the -i.bak option to prevent a backup file from being created.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just by some quick googling it seems the & was added for hhvm compatibility. Maybe some kind of pull request could be made to the main project that would detect if hhvm is being used and then keep the & but otherwise not use it...?
looking at the code i think this might mean duplicating the function, but really i don't know.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There has been no update of w3tc in over 5 months and PHP7 and WordPress support for PHP7 have both been out for over 3 months.
It's about time that this gets fixed!
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kmob2
+1
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't believe that such a widespread issue has still not been fixed after 7 months.
It literally takes 1 change of 1 character to fix this. What could the possible excuse be for not updating W3-Total cache plugin with this fix?
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just had the same problem on xx And again I fixed it, with the solution provided above.. Thanks a million... :) What I dont understand is, why doesnt this happen on all of my other sites? And why does it happen in the first place?
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AviatorBobo It's a problem that occurs on web server using PHP 7
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many Thanks!
Jus now with PHP 7.0. I have this problem and I solve it Thanks you!
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx Man,
This solved it for me to!
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this still an issue? W3TC could totally detect if PHP 7 is being used and define the function differently.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is becoming a running gag
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also had simular problems with php 7.0. Would be great to have a fix as soon as possible
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi guys
i am having a similar issue,
but with line 3553 of the functions.php file..
latest hhvm,
and php7..
/**
*
*
*/
function wp_ob_end_flush_all() {
}
/**
any quick fix for this?
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@txaqo The fix in this commit fixes your problem.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am running php7 and have same issue, the solution works for me, thanks...
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope this gets added quickly.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this really goes to show how un-maintained this plugin is. Time to switch!
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it works properly.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm this fixed php7 problems for this plugin with my site. CDN and Cache options now work correctly.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A PHP production system was suddenly broken today. I applied this fix before but it is no longer working with the latest PHP 7 version! On PHP 7.0.9 I was just getting a white page and even the dashboard could no longer be accessed. Adding the ampersand again fixed this problem but there are secondary issues still there. So we need a real fix which solves the root cause.
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbratschi
Info in the below links fixed additional problems with PHP 7.0.9 for me
https://www.itnota.com/fixing-php7-compatibility-issue-w3-total-cache/
https://wordpress.org/support/topic/w3-total-cache-and-php-709
e71030e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mike-Johnston Thanks, found this in the meantime too.
Here are all occurrences of ob_callback() which have to be modified:
https://github.com/crowdfavorite-mirrors/wp-w3-total-cache/search?utf8=%E2%9C%93&q=ob_callback
Attention: PgCache.php is in the parent folder. All other files are in the same directory.