The Pencil Guy: Hourann's illogical blog

Fixing WordPress 2.1 + PHP 5 + HTTP 1.0

Saturday 31 March 2007 at 8:03 pm

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!


And there goes my MP …

Thursday 29 March 2007 at 8:35 pm

Carmen Lawrence at Notre Dame Uni
photo by robcorr

I have just learnt that my Federal MP is to retire at the next election. This is a shame, because despite being a backbencher Carmen Lawrence always seemed to fit in well with the character and style of politics we have around Fremantle. (The city is the epitome of that quaint notion of “chardonnay socialism”, and suburbs like my own are working-class heartland.)

I hear she’ll be replaced by fresh blood, which is great, though I hope the new person will be good enough to fill the shoes — this seat was previously held by such notable figures as Kim Beazley senior, former treasurer John Dawkins, and good old John Curtin himself.


By request: an assessment of Labor’s broadband policy

Thursday 29 March 2007 at 6:51 pm

My initial reaction to the Ruddster’s announcement from a week ago (and yesterday’s radio ad) was exactly what the Labor strategists wanted: “wow! faster Internet! that’s cool!”

But on closer scrutiny, I’m not so sure that spending billions of public dollars to cover the country with fibre to the node is the best way to go about fixing the problems in Australia’s broadband. After reading Joshua Gans and Ross Gittins, I’m thinking it’s a step in the right direction, and way ahead of what we’ve seen from Howard so far, but also not the best possible decision.

Read the rest of this post »


Someone reading my mind?

Saturday 24 March 2007 at 2:32 pm

Artist's drawing of proposed western foreshore development; Creative Commons licence doesn't apply to this image

The West has an (impressive, I’ll grant) exclusive today about a thus-far undisclosed DPI plan to redevelop the foreshore near the convention centre. There are sadly no details yet, but the picture that’s been leaked is awfully tantalising, to the point that I may yet have to eat my words on the “no action after Landry” front. Better still, it seems that the planners had the same idea that I had about rejigging the freeway interchange to allow the demolition of flyovers south of the Convention Centre, which is awesome.

Because this is still at a behind-closed-doors phase, there’s nothing to support or write letters about. However, the Northbridge Link plan (i.e. the other big development that Perth needs, and the subject of The West‘s other page 9 report) has a short online consultation form that I’d encourage my fellow Perthsons to fill in over the next week or two :-)

1 comment »

Lots of ideas, but not so much action

Friday 23 March 2007 at 8:20 pm

(Apologies for the delay in service: I think I’ve wrought control from the unruly plugin that was randomly breaking things.)

So in the two-ish weeks since Charles Landry left, there’s been a remarkably fiery debate about how best to handle the future of Perth, with plenty of ink spilled, but sadly little in the way of signs of change among the leaders who are holding us back. (At least this was a better reception than what he seems to have earned at his next stop, Mumbai.)

The West Australian published a two-page spread last Saturday which basically repeated things that have been said for ages, like “connect the city with Northbridge” (even though that’s already planned and is pretty much a done deal, since every major stakeholder has agreed). There was also a generic “more support for the arts” call, which is great, but the implied qualifier “from the public purse” isn’t a real solution; as Landry pointed out, we actually need a greater sense of private patronage.

They also published a bunch of letters on the matter, with some others online (note that what’s online aren’t comments in the normal sense, but in fact letters in the old-school sense). PerthNow did something similar. It’s interesting that many comments are saying things like “Perth is fine as-is, if you don’t like it, why not leave?” … maybe someone needs to tell these people that that’s exactly what is happening!

I’m also a bit suspicious of all of the comments calling for “better public transport” — while I agree with the sentiment, it seems like lots of these people don’t actually use the existing services. For instance, I read several calls for a circular service linking the train lines, which already exists! (That’s not to say it can’t be improved — higher frequencies would be great, and the CircleRoute passes close to the same airport that lacks bus services …)

Some vaguely promising signs came from the Liberals this week, with suggestions like free wifi in Joondalup (in Perth, the owners of the overpriced existing service would complain) or establishing a carbon trading market. This latter idea is, in fact, a brilliant concept that’d do wonders for Perth, and fits nicely with Landry’s suggestion of making Perth a centre both for mining and for repairing the damage it does. Sadly, I doubt there’s strong enough political will anywhere in WA to see this through to reality.

Meanwhile, when speaking to CEDA the Opposition Leader announced he’d be interested in using the convention centre as a catalyst for change, making it the centre of an entertainment district by the waterfront, to complement sports and culture districts at Burswood and East Perth respectively. This sounds like it might be the start of a useful idea (although I see things wrong with it already) … problem is, so far it’s just two paragraphs in a speech. Good luck finding any real policy on his official site, which is about as well-organised as his party!

So let me take a shot at gap-filling: a pollie with real guts might suggest sacrificing the outermost lanes of the freeway as it passes over Mounts Bay Road, turning them into ramps that go straight down to meet the road. Then, Barrack Street and The Esplanade could be changed back to two-way streets, thus turning the Mounts Bay Road intersection into a standard freeway diamond. This would allow all four flyovers south of the Convention Centre to be demolished, and for Riverside Drive to be ripped up from Barrack Square to the Narrows Bridge — which would free up hectares of prime land for riverfront development.

Similar ideas are emerging on this SkyscraperCity thread, which incidentally is one of the few online discussions of the topic I can find (another is in a local queer publication). This is a shame, because creative and out-of-the-box thinking was exactly what Charles Landry asked for, and it is exactly what we need to make the convention centre stop sucking.

no comments »

Charles Landry hands down his verdict

Monday 12 March 2007 at 10:45 pm

Charles Landry speaking about Perth This evening I was at the Maj to listen to Charles Landry report on his findings from applying his expertise in the evolution of cities to our fair settlement. As proof of the fact that he’s struck a chord in his short time here, all 900 seats of the stalls and dress circle were filled.

(Incidentally, Mr. Landry was in residence in Adelaide and Canberra before Perth … I wonder if they took to him so strongly? Or are their growing pains less severe?)

His presentation was charismatic and engaging, even when he repeated oft-cited observations — that Perth is ideally placed for an Asia-centric future, and that if we continue growing as we are there’ll be nothing but suburbia for 100km in every direction — and recycled one-liners from the essays he’s written for the West Australian. He expressed dislike for Perth’s many concrete-blob brutalist buildings (think Alexander Library or Sir Charles Gairdner Hospital), citing them as examples of a Perth that is uninviting and saying “no”. And while I agree entirely, his critique of our architecture was the most controversial part of his speech — when he said that that coloured house by Scarborough Beach was a move in the right direction, there were several incredulous scoffs from the crowd.

I haven’t yet read his report in detail, but it seems to build on ideas that he’s described before, and it’s safe to say that it lays down a positive new way of thinking about our city:

What is Perth doing to future-proof itself? It is understandable that the resources super-cycle can blind people to looking ahead, and it is easy to be swept along by the wave of prosperity and become complacent. Are the education resources of Perth treated as a strategic export industry? Are the creative industries seen as crucial to Perth’s well-being?

Walking away from the theatre, the gentleman I spoke to (I neglected to ask his name, although he’s active in arts administration?) had the same question on his mind as I did: what’s the next step? I think the simplest of the many take-home messages from Charles Landry is that generally speaking, we are short of culture — not that we lack great musicians or interesting sculptors (quite the contrary), but that their presence can’t be felt when wandering around Perth. Thus, we should get behind any initiative that makes the arts more accessible to people, whether it’s a traditional idea like sculptures on footpaths or a more eccentric one like painting buildings (or projecting onto them).

His other suggestions are harder for lowly plebs to support: for instance, Landry supports green roofs and solar panels on buildings, but that’s up to owners more than anyone else. He’s also as scathing as he can be of the clutter of bureaucracy and regulation that chokes our city, making it into a “no” place that stifles creativity. Indeed, I was horrified by his anecdote about visiting Woodside Plaza and taking some pictures, only to have security come over and question his presence (can you believe it’s common practice?). But regulation “spaghetti” is a systemic problem that can’t be overcome without englightened souls high-up, unless there’s overwhelming public pressure — which, admittedly, is something we can all contribute to.

And something tangible that you (yes, you!) can do right now is to sign FORM’s petition. It’s horribly vague and devoid of tangible demands, but it is at least a reasonable start in terms of indicating support for the kinds of changes that Landry has suggested.