- Blog, woe! I honestly didn’t mean so much neglect, although in my defence the Real World has been throwing me a fair few curve-balls lately.
- As a result of said curve-balls, I have a chance to travel! Thus I’m in Washington DC and just left the neighbourhood bar where I was watching the last presidential debate (oh, and pretending to be an American). This was particularly entertaining for the jeers that spread through the room when the candidates spoke about the school system here! Both candidates did a decent job, although Obama didn’t really address the terribly unbalanced federal budget and McCain struck me as more than a tad hypocritical. My favourite quote from the locals: “I don’t care about the parties, I’m voting for DC statehood!”
- A few weeks ago, I jumped on the tram to Santa Clara for the PHP developers’ event ZendCon, which was awesome! I scored a book because no one else knew about JAWS (tsk, tsk), and spent too much time at Yahoo’s party writing a solver for their Sudoku puzzle with Shaddy of learning.net! (Here’s a few thousand solutions). My favourite sessions were Jay Pipes on databases (“never assume anything about the MySQL optimiser“) and Terry Chay’s uncon session with its gratuitous excrement references
- The economic crisis that started in America and suddenly gripped the world had me quite startled! I mean, it was obvious that it was coming, but I’d have never predicted when or how bad (and the red arrows on my meagre NYSE portfolio demonstrate as much!). I am surprised by the measures that have been taken by governments (particularly the Americans!) in the hope of prompting a recovery — and yet John McCain still speaks of small-government conservatism! So much for laissez-faire.
- Last week, Victoria formally decriminalised abortion! This is pretty cool.
- And finally, the Western Australian government has held together, hooray! although I’m yet to see them actually do anything, other than make threats like cutting the budget a la John Howard’s first term.
A little catch-up post
Fixing WordPress 2.1 + PHP 5 + HTTP 1.0
So I’ve finally figured out the random problems that were plaguing this blog. It all started when I upgraded to PHP 5.2.1, which breaks lots of functions that software like WordPress depends on. The obvious step, which I was silly enough to delay, is to upgrade WordPress and all plugins to their most recent versions, thus making life much easier. (Many plugins are bitten by output buffering changes.)
But I was still having trouble due to this nasty bug, whereby recent versions of PHP plus recent versions of WordPress will cause the output to always be HTTP 1.1. Symptoms include seemingly random hex character strings scattered around your blog (such as when connecting via telnet), or blank pages that only affect some people. This is because HTTP 1.1 features, like the chunked transfer encoding, confuse clients that only speak 1.0 (including many commercial proxy servers and a lot of Python code built on feedparser).
The fix is to edit line 832 in wp-includes/functions.php
. Replace this line in the status_header
function:
@header("HTTP/1.1 $header $text", true, $header);
with this much happier code:
@header($_SERVER["SERVER_PROTOCOL"]." ".$header." ".$text, true, $header);
Also, I found that upgrading to 2.1 breaks the old version of Jerome’s Keywords, and can unexpectedly change your link category numbers.
Update 16/5: The problem has been fixed in WordPress 2.2. Thanks Ryan!