Posts about the server side scripting language PHP

Connecting To A Non Standard MySQL Socket In PHP

Friday, February 11, 2011 - 14:28

Connecting to a MySQL database in PHP is usually not a difficult thing to do, in fact it is one of the first things that many tutorials will go though. However, there are certain curcumstances that require more information than the standard host, password and username details. A good example of this is when connecting to a local MySQL server through a different (or at least non standard) socket. The normal place for the MySQL socket to be on a Linux install is /var/run/mysqld/mysqld.sock, but some hosts might change this.


PHP Array Of Countries

Thursday, February 3, 2011 - 10:31

Use the following array if you want to get a list of countries, along with their codes. These codes are the 2 letter ISO code, the 3 letter UN code and the 3 number UN code. I had to build this the other day in order to present a list of countries in a form so I post it here in case I need something like it again.


ReCaptcha Not Displaying In IE6

Thursday, January 6, 2011 - 12:17

I came across a bit of an issue with ReCaptcha and IE6 today, so I though I would write about it in case anyone else had the same issue (there wasn't a lot of stuff on Google about it) and so I can remember what I did in the future.


Lazy Coding In PHP; A Mini Rant

Tuesday, January 4, 2011 - 13:44

If there is one thing in the PHP world that really annoys me it's programmers writing what I call "lazy code". This is code that works but takes the least amount of time (generally meaning keystrokes) to create. This is almost always a bad thing as it is difficult to read, hard to change and almost always uncommented. The main problem is that PHP is quite a forgiving and fluid language in that you allows you to write code in a variety of different ways and formats.


PHP Unconference Europe 2011 - Get Your Tickets Now

Friday, December 24, 2010 - 12:43

Next years PHP Unconference Europe (PHPunEU) will be held in Manchester on the 19th and 20th of February at TheStudio. The 2010 event saw 260 developers converge on a location in the north of Germany and gained a lot of attention within the German speaking PHP community. With the event being so near to me I decided that I must go along, especially as the tickets are only £40. The support of the PHPNW user group was apparently very useful in selecting Manchester as the location as they were able to give support and advice to the organisers about possible venues within the city.