This website uses cookies to improve your experience and deliver relevant information.

We build solid foundations

Our holistic, strategic approach to design, development and marketing means we help you build a strong, sustainable digital presence


on Monday, 06 February 2012

Updating from PHP 5.1/5.2 to PHP 5.3 on CentOS Servers

Joomla! 1.6 requires PHP 5.3 or later to be installed. When requesting a new server, this is far less of a problem as many will be provisioned with PHP 5.3 already installed. What should you do, however, if you are running a version of CentOS prior to 5.6 you will need to manually update PHP before Joomla 1.6 will install.

In fact, even with Joomla 1.5 you may experience issues if you are running an earlier version of PHP. The latest build of Akeeba Backup, for example, requires PHP 5.3.

This post will detail the method you need to use to update from PHP 5.1 or 5.2 to PHP 5.3 (Note: These instructions should not be followed to update from PHP4 unless you know exactly what you are doing!)


The default Yum repositories currently contain PHP 5.1.3 which is, of course, too old for our needs. So we are going to need to add another repository.

Atomicorp, the makers of Atomic Secured Linux host a repository containing the information we need. They have instructions on how to install the repository here, but we are going to pursue a slightly more secure method (Note: It is never wise to pipe the output of wget straight to the shell!).

 To begin, you will need Shell access to your server. The most common method of obtaining this is to use Secure Shell (SSH), however some control panels such as Plesk will allow you to obtain this access from within your browser.

cd /tmp
wget -q -O ""

The last command will allow you to view the contents of the downloaded file, have a quick look over just to see if there's anything suspicious! At time of writing, running the md5sum command should give the following result (this will change if they update the script)


Now having verified the script, we can execute it and perform the upgrade

yum upgrade # Follow the instructions
service httpd restart # Restart the HTTP Daemon (usually Apache)

If all went well you should now be running PHP 5.3! The process will take a while as there may be quite a number of packages that need updating once the new repository has been installed. Future updates should be far less painful however, simply requiring

yum upgrade packagename #e.g. yum upgrade php


Virya Technologies can provide support if you encounter problems or simply feel that you'd like someone else to perform the upgrade for you


We support shared hosting, VPS and dedicated servers Host with us today!

Virya Group provides a range of solutions to your technology needs