PHP

Posts about the server side scripting language PHP

PHP Unconference Europe 2011: Part 1

Sunday, February 27, 2011 - 14:19

This weekend saw the PHP Unconference Europe 2011 event in Manchester. The organisers were hoping that the rain would hold off for the weekend, and being true to form Manchester was wet and cold. Being an unconference the talks and discussions are mainly casual and dependent on what everyone decided to see on the day. The event ran across Saturday and Sunday with different talks on each day.

Category: 

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.

Category: 

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.

Category: 

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.

Category: 

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.

Category: