Blog Archives

PHP Session Management (grievance 2)

Sometimes PHP surprises you with an easy-to-use feature, like sessions. Sessions are quite easy to use in PHP. One call to @session_start(), and you have a magic global called $_SESSION to store data in; associated with the user using a

Posted in PHP

PHP grievance number 1

There’s a lot to hate about PHP. Maybe that’s harsh: nothing’s perfect, every language has it’s strength and weaknesses, and noone ever suggested using PHP for everything. Bearing that in mind, I’m using PHP daily, and you get used to

Posted in PHP, Rant

Upgrading WordPress using mysqli

Out-of-the-box WordPress assumes it’s going to be talking to a MySQL database using PHP’s original mysql extension instead of the newer mysqli extension (true up to WordPress 2.1.3 at least). If for some reason you need to run using mysqli,

Posted in PHP

A handy PHP debug function

Like most developers, I often find it useful to spit out a few messages in the middle of a PHP script – especially when I’m debugging some problems. Sadly, after only a few months our pristine code-base has become spotted

Posted in PHP