How to install LibSSH2 on a CentOS 5 system
Libssh2 is a C library implementing the SSH2 protocol for PHP. Here’s how to get it installed on a CentOS system running PHP 5.1.6. First step is to install some dependencies. yum install automake php-devel libtool openssl-devel gcc++ gcc Next, let’s download the latest release of libssh2 (1.2.2 at time of writing), unpack and install [...]
Accessing a timezone list in PHP
The php function timezone_identifiers_list is only available in newer versions of PHP (typically 5.2+), although the php site suggests it is available in versions 5.1.0+. If you have CentOS (current version 5.4) or another linux distro that has 5.1.6 or similar, you may find the function does not exist. For these situations, I have compiled [...]
Foreign Key tutorial using MySQL
Foreign key’s in a database table reference primary key’s of rows in another table. Why does this matter? Well, if you have ever built an application whereby updating/deleting a row from one table requires further transactions to be carried out on other, you’ll know the nuisance and confusion this can cause (especially if your application [...]
Introduction to Doctrine’s Nested Set
A common problem requirement among developers is to store hierarchial data to a flat file database. You have probably come across the parent/child methodology whereby a table has a typical ‘parent’ column that references, you guessed it, its parent – this method is also known as adjacency list model. Querying in this way can often [...]
Integrating CodeIgniter and Doctrine
Having used CodeIgniter over the past year or so, I came to realise some limitations with the Database library. CodeIgniter does not have a proper ORM library like a lot of other frameworks provide. With an ORM library, you have a lot more tools at your disposal to not only increase productivity but also improve [...]