PHP 5.2.10 and PEAR – Notice: Undefined variable: dorest in PEAR/Command/Install.php on line 1220

Today, after upgrading packages with apt-get on a server running Debian Lenny my PEAR installation seemed to be broken. PHP had been updated to 5.2.10 and PEAR version was now 1.8.0. So when I realised that PEAR wasn’t the latest stable I tried upgrading PEAR using the command I’ve always used: pear upgrade pear, where the first “pear” is the command we run, then the “upgrade” sub-command and finally the name of the package we want to work with, unsurprisingly “pear”.

So I type the following expecting a happy success message and get this instead:

# pear upgrade pear
Notice: Undefined variable: dorest in PEAR/Command/Install.php on line 1220
Notice: Undefined variable: latest in PEAR/Command/Install.php on line 1228
Notice: Undefined variable: latest in PEAR/Command/Install.php on line 1234
Warning: array_change_key_case(): The argument should be an array in PEAR/Command/Install.php on line 1234
Nothing to upgrade

After a quick look at the problem I figured out that it was a problem with the cached channel data that PEAR stores under a directory called ./channels in the PEAR installation directory. The problem is quickly solved by deleting the files in that directory. To find out where PEAR is installed you can use the “pear list-files” command as follows:

# pear list-files pear
Installed Files For pear
========================
Type Install Path
php /usr/local/zend/share/pear/OS/Guess.php
php /usr/local/zend/share/pear/PEAR/ChannelFile/Parser.php
...

Read more

Screencast – Adding mp3 playlists in WordPress using the “WP Audio Gallery Playlist” plugin

Screencast: Fetching tweets with jQuery and the Twitter JSON API

A very brief (5min) screencast based on the code used in my previous post “Fetching tweets with jQuery and the Twitter JSON API“. This screencast was made with screenr, so I was limited to 5min in length and no editing of the video…

‘No IE’ WordPress plugin released

Today my first WordPress plugin was published at the official WordPress plugin site and it is now available for download. This plugin simply replaces your site’s contents with a message asking visitors to use a better browser if they use Internet Explorer 7 or earlier.

Every web designer knows how annoying it is to deal with internet explorer issues, and how the use of Microsoft’s browsers hinders innovation. But not just that, offering support for IE6 and IE7 normally means a lot of unnecessary extra work and holding back from modern design techniques and technologies (CSS3, png transparency, round corners, HTML5, …).

Read more