Update Godaddy VPS and DS to run PHP 5.2xx

In order to run the next generation of content management systems, you really need to be running an up to date version of PHP.

The next incarnation of Joomla (1.6) requires PHP 5.2+
As does Drupal 7 (as well as some current modules for the existing system)

Look at any new CMS or shopingcart PHP software and you will see it all requires a recent version of PHP to be installed on your server.

This is all good news, but not when you have a CentOS Linux server. CentOS is not the fastest OS to release compatible updates to the system. This does not mean they are not available, only that they are not officially released to be updated through YUM. You can compile your own PHP 5 ini file but this can also cause you a lot of problems as you will see later.

I looked at this a long time ago while wanting to test magento in a server environment. I ran into a couple of problems that I didn't understand at the time and let it go as I really didn't actually need to use it.

After a while of just wanting it on there to test the new versions of Joomla and Drupal so my bosses could actually see and use them, I went back to google and found myself at the same post from freshblurbs.com. What I didn't understand at the time turned out to be really simple so I thought I would repost the solution here specifically for customers of godaddy running virtual private servers (VPS) or dedicated servers (DS).

The original post can be found here.


This post also spells out the problems involved when updating in any other way so read them well before you start.

What we are about to do is add another location for the system to look for repositories of software that are compatible with the system involved.

Ok, so, after you have read the post at freshblurbs.com, you should read Jason Litkas' post, the guy responsible for compiling the updates you are about to install.

First of all, a pre-installed godaddy system does not include pecl so the first instructions you are given will result in an error.

Start by loging into your server as root user through SSH as detailed here.

The first instruction on Jasons post uses nano, which is where I got my first error. So first we need to install nano!

yum install nano

simple as that

Then we continue with his instructions to add his repositories to the system.

nano -w /etc/yum.repos.d/utterramblings.repo

This opens the nano editor where we type:

name=Jason's Utter Ramblings Repo

Exit and save, and the repositories are now added to the system (if everything is typed correctly)

You can update now through SSH or login to the simple control panel (or your alternative control panel) and update there.

To update PHP to version 5.2xx using YUM type:

yum update php

and follow the onscreen prompts.

Think twice before you click on everything in the control panel to update to the latest version. If you update the mysql server you will have to run additional comands to update previous tables and have it work again with your control panel. This may also be true for other parts of the system. I updated PHP to 5.24, Apache and Mysql, but all that was nessercary was to update PHP to 5.2xx.

To run a mysql table update use

mysql_upgrade --password[=password]

Where password (the second one) is your root user password

To run magento you will also need Mcrypt and Mhash as detailed here.