Installing Subversion on CPanel/WHM

Just a quick tip for those who (like me) have wanted to install the Subversion client on their CPanel/WHM VPS. (I have my repositories hosted with so no need for a Subversion server to be set up). I have a couple of VPS servers set up and wanted to install subversion on both. After a bit of Googling I worked out that by simply logging into the command prompt as root and installing Subversion via YUM

# yum install subversion

It should install fine, and on the first of my VPSs (CENTOS Enterprise 4.6 x86_64) it did. Great!

However, on the second VPS, it came up with the error:

Error: Missing Dependency: perl(URI) >= 1.17 is needed by package subversion

This VPS is running CENTOS Enterprise 4.6 i68. Initially I tried to install Perl URI via YUM, using the command yum perl-URI, but it reported that there was nothing to do, so I tried to clean the cache (yum clean all) and try again, but still no luck. The solution was to find a suitable RPM, download and install manually. After a bit of searching, I found a list of RPMS, one of which was suitable for my distro. I installed the RPM, everything went well, so had another go at installing subversion and all worked fine. These are the steps I followed:

# wget
# rpm -i perl-URI-1.30-4.noarch.rpm
# yum install subversion

To test I tried

# svn --version
svn, version 1.1.4 (r13838)
compiled Aug 21 2005, 20:56:55
.... etc .....

Which means it’s working!

Hope this helps someone out there.

Note: This post has been copied from the old website, originally posted on 2008-03-27. See this entry for more details

Updating, moving old blog entries

We are currently in the process of updating the website. We should have done this months ago, but we’ve been a bit rushed out (as ever). During this tidy-up I’ll be moving some of the old blog posts from ibrow that I wrote over to my blog (which you’re looking at right now).

Stay tuned for some “retro” posts.

MySQL Insert with a Select Subquery

This is a post more for me than anyone else, but hopefully others out there will find it useful.

Today I had a problem in that I deleted all entries from a MySQL database table that I shouldn’t have. This table was basically a mapping table, mapping many to many relationships between two other tables. Unfortunately I didn’t have a recent backup of the database (lesson learnt there!).  Originally I thought it would be a nightmare having to put all the entries back in, then I remembered that all the mapping entries I have deleted always had another corresponding mapping entry.

The table structure is really very simple:
band_id and group_id.

I had removed all instances of group #103, however, every instance of group #103 was replicated by group #104.

All I needed to do was to re-insert the group #103 for every band_id that was mapped to group #104. A simple subquery!

Here it is:

INSERT INTO  map_band_group (band_id, group_id)
(SELECT band_id, 103 FROM map_band_group WHERE group_id = 104);

This little snippet saved many hours of work: it’s good to be lazy!

Pencil: The best thing since sliced bread?

Well, probably not, but Pencil is still pretty damn cool!

But what is Pencil? According to the Pencil Project website their:

..unique mission is to build a free and opensource tool for making diagrams and GUI prototyping that everyone can use.

Playing around with a Pencil!

But what does this really mean? Well, from my point of view you could condense the above sentence into one that reads as “a massive time saver”.

Pencil is a Firefox addon (or stand alone app if you have XULRunner installed)  that lets you quickly sketch out a website or desktop application without having to use a heavy duty graphics package. It is pretty much as close as it gets to paper prototyping without using paper.

In my day job I have to do a lot of prototyping. Whether it is for a desktop app, a new website or a funky cool mobile web app. And as much as it sounds, prototyping is not all glamour! It can be incredibly dull and monotonous (which is why I recommend loud in the headphones). However, Pencil is proving to be a huge time saver. As an example, the image above is the result of about 1 minute of playing about with Pencil for this article. It’s not amazing, but it is a damn sight better than the results after 1 minute playing about in Fireworks or Photoshop.

If you have any level of prototyping to do, download Pencil!

Rant of the Day: Namespaces

This is just a really quick post to try and vent my frustrations! Why don’t web developers use namespacing?

It is so frustrating when you’re tying to integrate a 3rd party plugin into your website! For example, I have a page containing some pre-existing JavaScript, and I want to add a nice little piece of JavaScript functionality into the page, however, when I do it conflicts with the existing JavaScript because it doesn’t use any namespacing! Or even worse it uses the magic “$” function without a care in the world what else might be using it.


And it’s not limited to JavaScript – there are some CSS frameworks out there that don’t employ this easy-to-use-yet-frustration-saving-technique or plugins developed for popular blogging software that use CSS that isn’t namespaced either – so it screws up your lovely styles.

Double Argh!

This is not a new concept, it’s not difficult to do, and it saves much pain and suffering of a developer who is up against a deadline! All it takes is just a little thought to how people are going to use your plugins, and how your plugin will get along with everything else.

So dear developers out there, all I ask of you is this: please, please, please namespace.

Caveat: This is just me having a rant. I know how much work and effort goes into creating 3rd party plugins etc for the benefit of all, often with little or no reward. I thoroughly appreciate this work done for the love of it by selfless individuals. All I’m saying is if you take that much care and time over something, wouldn’t you want to make sure it doesn’t break somebody else’s work, which has has an equal amount of care and time spent on it?

Fixed – jQuery DatePicker not working in Thickbox

I’ve been struggling today for about an hour trying to get jQuery‘s DatePicker working in Thickbox. There appeared to be some kind of conflict. I tried hacking up the Datepicker plugin file, changing the z-index of the CSS but nothing. The date picker wasn’t even being called.

Eventually I found that other people were having the same problem, and a comment by Kevin Luck (the author of DatePicker) flicked my brain into gear.

The problem was that I was initialising the datepicker on page load, not on the loading of the thickbox content.

For example, at the start of the page the Thickbox was going to be loaded in I had this:

<script type="text/javascript">
		// initiate date picker

However, I found that if I removed that from the head, and instead inserted it in the Thickbox content, e.g:

<div id="MyThickboxContent">
<script type="text/javascript">
		// initiate date picker

It worked fine, problem solved!

Kohana PHP Framework – My Thoughts

As some of you know, over the past few weeks I’ve been building a prototype for a new web app. For this I decided to try out the Kohana PHP framework to see if it will help speed up development. I chose Kohana primarily because it was light weight and PHP5 only, and I have to say I’m really glad I did. After several weeks hacking around with Kohana (mostly playing admitedly, but I’m almost to the point of having a fully working web app up and running) I have collected a few thoughts on the framework.

Good Points

  • It is PHP5 only (5.2 and above) so it allows for utilising the full power of OO PHP.
  • It is light weight.
  • True auto loading – it’s PHP5, you shouldn’t have to explicate load a class!
  • The cascading file system – this is a joy to work with. It easily allows you to extend and add to modules, libraries, models and configuration files.
  • Kohana has greatly speeded up the development of my prototype and has allowed me to focus on the actual functionality of the app, leaving all the boring, repetitive bits of coding to the framework.
  • I have had to dig about under the bonnet a few times to see what’s going on, and I have been impressed by the clean and well structured code.
  • The community – behind Kohana there is a small but active and knowledgeable community. I have been stuck a number of times when hacking around with Kohana, and on both occasions I have received prompt and useful replies.
  • Most importantly it lets you code how you want, without getting in the way, whilst at the same time can take out a lot of the donkey work for repetitive tasks.

Bad Points

This is going to be difficult, but I’ll give it a try

  • Documentation.  From what I can make out it has come on leaps and bounds over the past few months, however, it sometimes isn’t always clear. Also, the tutorial site hasn’t been updated for a good few months now.
  • Limited number of modules currently available.

However, the above points aren’t deal breakers. Kohana is an open source project, and relatively young at that. This means that I can actively do something about both the documentation (it’s a wiki that anyone can register) and the modules. I just need to find some time and contribute!


As you might already be able to tell, my conclusion is going to be positive. I have really enjoyed playing around with Kohana, it is solid, secure and well designed. Being PHP5 only, not only can I utilise the full potential of PHP, but so can the framework. As said, I’m really glad I chose Kohana, and I am pretty excited about its future developments.

If anyone out there needs a solid, well thought out framework for PHP5, that is backed by an active community, you can’t go wrong if you chose Kohana.


I have been using Kohana version 2.3 exported from the SVN – details on the Kohana dev site.

Other Reviews

Don’t take my word for it, other people are talking about Kohana too

  • Review at – very recent so a good review of the state that Kohana is in at the moment.
  • The final part of a review comparing Zend, Symfony and Kohana. This review is about 6 months old, so the comments about the lack of documentation are slightly less accurate today.
  • Comparision of Kohana and CodeIgnitor (the framework Kohana was originally forked from).

Setting up XDebug for PHP in Ubuntu Intrepid Ibex

I love Ubuntu and today reminded me exactly why. It’s just so easy to do stuff in it!

I run a LAMP development server off my laptop, and today some of the PHP I was writing was throwing up some errors. Unfortunately I hadn’t installed XDebug which makes life so much easier when debugging PHP.

Oh no, I though. I’ll have to download it, install it, update the PHP.ini file. Argh.

But wait…no! I have Ubuntu, all it took was 2 easy steps:

Step 1, install Xdebug

sudo apt-get install php5-xdebug

Step 2, restart Apache

sudo /etc/init.d/apache2 restart

Done! Easy peasy.

Thanks Ubuntu :)

400 Tweets Later, What Have I Learned?

I’ve just posted my 400th tweet, which is ironically a link to this blog entry. I’ve been using Twitter for about a year and a half, with my first tweet being:

Just joined twitter to see what all the fuss is about 5:18 PM Jul 20th, 2007 from web

A modest start I think you’ll agree. But now I’m on my 400th, I thought I’ll post a little post about what I’ve learned over that time, and why I’m addicted to it.

Now a quick caveat. I’m not a Twitter “power user” I follow about 200ish people and about 100ish people follow me which I’m more than fine with. I can’t imagine following thousands, or have thousands follow me and I don’t really want to. I don’t post that often, but I always have Twitter on in the background, both at work and home.

So here we go, and in no particular order:

1. Twitter is a great News Service.
I’m following a few news sites, plus a few people with their fingers on the pulse, and through Twitter I get to hear about the latest breaking news.

2. Twitter is great background noise.
I think I like using Twitter for the same reason I like having an IRC channel open for the particular framework I’m using at the time, or why I like having the radio on (especially the Cricket) in the background. It reminds me that other people are “out there” living their lives and getting about their daily business. It’s sort of comforting.

3. It’s great for keeping in touch.
I follow a few friends from real life(!!) on Twitter, and it’s really easy to pass on a quick “how’s things” which is all you really need to keep in touch

4. It’s less obtrusive than IM or Skype etc.
Basically it is much easier to ignore Twitter if you want to

5. Keep up with trends.
I don’t mean what which shoes are “to die for this season” or anything like that, but more abstract. As you may know I’m a programmer, who runs my own web development company, and I follow people in a similar situation. It’s good to hear their take on things, which way they think the land lies, what they are up to. “Trends” I think is the marketing name for it.

7. Get inspired.
Related to the above as it follows along the same lines. Twitter allows you a bite sized view in to peoples lives to see what they are up to. Some of the people I’m following are doing some really good stuff, and it inspires me to do more myself.

Hello 2009!

Hello and a Happy New Year to everyone out there.

I hope you all had a relaxing (not boring) or busy (but fun) Christmas and New Year break. I took the liberty to have a complete break from work, laptop, interweb, Twitter et al and it has done me the world of good. I’m fully refreshed and raring to get on with 2009

So what can you expect from me over the coming 12 months? Hopefully lots of interesting stuff. Here is a quick breakdown:

  1. I need to re-brand and reposition the business for the coming year. Nothing drastic, just focusing what ibrow is all about.
  2. Loads more work on Timesheet Next Gen. I should be getting the first official release out this weekend, so that’s exciting. Lots of ideas for this and we have a great team.
  3. Have fallen for Kohana PHP framework, and will be using it for a new project starting this month. You can expect to see lots of stuff being added here as I happily hack around in this well written, well thought out framework.
  4. More falling in love with Ubuntu, Xubuntu and OBbuntu?! If you can call it that. Have discovered the lovely window manager OpenBox which is simply, well, loverly. Really want to get my teeth into this and start hacking it up. All encounters will be posted.
  5. Lots of thoughts about system and working more efficiently. Especially if you’re teaming up with multiple developers in either a work or open source related environment.

So, until then stay tuned with the RSS feed