I’ve upgraded the server to PHP 5. As with last week’s MySQL upgrade, if anything seems broken, please comment about it here. If you can’t comment, email me at webmaster at this domain name.

Update: It looks like something in my setup disagrees with the combination of PHP 5 and WP-Cache 2. Pages were turning up blank the first time they were loaded, then perfectly OK the second time. Oddly, it was working fine under PHP 4.4, MySQL 5, and WordPress 2.

4 thoughts on “PHP Upgrade

  1. I tried the suggestion in comment 295 on the WP-Cache post: in wp-cache-phase2.php, in the function wp_cache_ob_end(), change ob_end_clean() to ob_end_flush().

    It fixed the blanking problem, but I ended up disabling it because it broke Content-Type headers on feeds. Everything was getting sent as text/html, even when I told it not to cache the feed files.

    I just took another look at it, and apparently the function WP-Cache uses to save the original HTTP headers (including Content-Type) doesn’t always pick up data if you’re using output buffering—which of course is integral to WP-Cache. The suggested solution is to flush the buffer before calling apache_response_headers(), so I looked at the code. ob_end_flush() is called right after the block that saves the headers, and the only circumstance in which it tries to write any output is if there isn’t already a Content-Type or Last-Modified header. Well, PHP is going to add a default Content-Type in the worst case, and I’m pretty sure WP generates Last-Modified everywhere.

    So I moved that ob_end_flush() to just before the line with if(function_exists('apache_response_headers') ). It seems to work so far. It’s caching, it’s not pushing out blank pages, and it’s sending the correct content type on feeds.

Comments are closed.