WP 2.2.1 wp_cache 2.1.1 php 5.2.3
-
Hi there!
Today I run into a problem with wp-cache 2.1.1.
After upgrading PHP to 5.2.3 it became clear that caching doesn’t work as expected.
Cache files were generated, but not used in following page requests.
I managed to fix this issue this way:- change wp-cache code (wp-cache-phase2.php)<br>Find this:
ob_end_flush(); if ($new_cache) { $serial = serialize($wp_cache_meta_object); wp_cache_writers_entry();
and replace with:
//ob_end_flush(); if ($new_cache) { $serial = serialize($wp_cache_meta_object); wp_cache_writers_entry();
- make sure that last line in your footer.php of your theme contains:
</html> <?php while (ob_end_flush()) { } ?>
After these changes wp-cache seems to work as earlier.
Did anyone encountered similar problem? What was your config?
Info: This problem is caused by register_shutdown_function(shutdown_function) and ob_start(ob_callback_function)
In wp-cache there was assumption that ob_callback_function will be executed before shutdown_function. After upgrading to PHP 5.2.3 this was opposite. But forcing ob_end_flush() at the end of template brought back proper order.Maciek Kus
- change wp-cache code (wp-cache-phase2.php)<br>Find this:
- The topic ‘WP 2.2.1 wp_cache 2.1.1 php 5.2.3’ is closed to new replies.