RaulTBC
Member
Posted 5 years ago #
I've been using WP-Cache for a while no, but a couple of days ago I noticed my WP site would server a blank page. Looking at the source would display the [html], [head] and [body] tags, with nothing else. A Refresh would then display the page.
When I disable the plug-in the pages load properly. Anybody experiencing this as well?
The PHP version is 5.1.6.
Any help would be appreciated.
On May 17th Pedro Valente (and Dreamhost) shared this regarding wp-cache:
My wordpress blog is hosted with Dreamhost and I found this in their support wiki:
If you have "blank pages" in WordPress with wp-cache turned on after you upgrage to PHP 5.1.2 - there is simple fix to solve the problem:-
1. Open wp-cache-phase2.php file* in your favourite text editor
2. Find out wp_cache_ob_end function
3. then inside that function find out line with: ob_end_clean(); (it should be line 219 or about)
4. and finally replace that line with: ob_end_flush();
I had already turned off wp-cache, but this solved my problem of a blank screen on every first load.
RaulTBC
Member
Posted 5 years ago #
That did it. Awesome - thanks!
swimswimswim
Member
Posted 5 years ago #
Here is the code replacement following the instructions above. It worked for me.
OLD:
ob_end_clean();
if ($new_cache) {
$serial = serialize($meta_object);
wp_cache_writers_entry();
$fr = fopen($cache_path . $meta_file, 'w');
fputs($fr, $serial);
fclose($fr);
wp_cache_writers_exit();
}
NEW:
ob_end_flush();
if ($new_cache) {
$serial = serialize($meta_object);
wp_cache_writers_entry();
$fr = fopen($cache_path . $meta_file, 'w');
fputs($fr, $serial);
fclose($fr);
wp_cache_writers_exit();
}
AnthonyP
Member
Posted 4 years ago #
this works and a big thanks