I've decided to retire this blog — I don't really see myself updating it any time soon, and haven't for over two years anyway. I intend to leave the content on-line for the forseeable future, but have converted it to a static site. As a result, dynamic things like search and comments aren't really going to work.

You can find me on Twitter or on Google+ if you like. Alternatively, I'm usually on IRC as LawnGnome on Freenode.

Thanks for reading!

Archive for the 'PEAR' Category

PEAR DB 1.7.14RC1 Released

Wednesday, November 28th, 2007

I’ve pushed out a beta release of PEAR DB versioned 1.7.14RC1 with a few fixes for issues reported since 1.7.13. Nothing in there is hugely urgent or high-risk, but I’ve made it a beta rather than a stable release due to the fact that I’m still a few thousand kilometres from my testing setup, which means that I’ve only been able to test against the databases I have to hand on my laptop — MySQL, PostgreSQL and SQLite.

All being well, I’m looking to get 1.7.14 final out around Monday (along with an Informix fix that I can’t work on without my Informix testing VM). Please feel free to test this release and report any issues.


Saturday, October 13th, 2007

I’ve seen three people ask a variation of how can I get a list of installed PEAR packages from within my PHP script in the last few weeks on IRC, and two just in the last day. Because I’m a helpful sort, here’s a little morsel of code that will do just that:

include 'PEAR/Registry.php';

$reg = new PEAR_Registry;
foreach ($reg->listPackages() as $package) {
    print "$package\n";

This should work with pretty much any version of PEAR.

(Update: Ken has a nifty bit of code in the comments to check for a specific installed version of a package.)

DB 1.7.13 Released

Saturday, September 22nd, 2007

I’ve just released version 1.7.13 of PEAR’s DB package. This includes a couple of minor fixes for the MySQL, MySQLi and SQLite drivers, none of which I’d class as particularly urgent. Grab it at your leisure from a PEAR server near you.

Important note: It’s been this way for a couple of years now, but I’d again like to reiterate that DB is deprecated in favour of MDB2, which is pretty DB-like if you load the Extended module. If you haven’t already made plans to migrate your programs depending on DB to MDB2, now might be a good time to start.

Particularly in light of this post to PEAR-DEV, which I predict is going to create considerably more e-mail for me to sort through. Short version: I’m considering setting an end-of-life date for DB at 8/8/8, the same as PHP4′s end-of-security-fix-life date. If you want to address the open questions in that post, feel free to reply to PEAR-DEV or my e-mail directly. My e-mail address is on the sidebar both on my blog home page and my about page.

PEAR DB 1.7.12

Friday, June 29th, 2007

It’s about a month later than I originally planned, but PEAR DB 1.7.12 has just been uploaded to a PEAR server near you. If you’re using DB with PostgreSQL and PHP 5.2.x, you’ll want this version, due to a backward compatibility break in PHP 5.2′s pg_escape_string. Otherwise, there’s not too much that’s exciting, although hopefully the Fedora Extras packaging guys will forgive me for screwing up the test suite slightly in 1.7.11!

Note that DB will no longer install with PEAR installers earlier than PEAR 1.4.0, as it now uses the newer package.xml format introduced in that version. That being said, if you’re still using PEAR 1.3, you really should upgrade per the instructions on the PEAR web site, since it’s no longer supported and all.

As per my usual plan, I’ll release 1.7.13 at the end of July (hopefully) if any bugs are reported.