Virya Technologies Blogs

Blogs from Virya Technologies staff

Posted by Ben Tasker
Ben Tasker
Ben is a Network Security and Linux specialist with experience on a wide range of Unix based Operating Systems...
User is currently offline
on Monday, 06 February 2012
in Joomla! Content Management System

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 installer.sh "http://www.atomicorp.com/installers/atomic"
cat installer.sh

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)

md5sum installer.sh
da96f1f49fb431ce99ef3bc9db0cfcec installer.sh

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

source installer.sh
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

Rate this blog entry
Ben is a Network Security and Linux specialist with experience on a wide range of Unix based Operating Systems, as well as a serious amount of experience with the Microsoft Windows Operating Systems. Ben is also an amateur photographer and enjoys writing articles on technical subjects.
Trackback URL for this blog entry

Comments

Guest
Stephane Tuesday, 20 March 2012

Hi, I followed these steps and worked great and upgraded my php 5.1.6 to 5.3.10. Now unfortunately I had asterisk installed on that server too and found out that asterisk version I am running is not compatible with new version of php. Is there a way to undo this upgrade? Is there a procedure out there to do that?

Ben Tasker
Ben Tasker
Ben is a Network Security and Linux specialist with experience on a wide range of Unix based Operating Systems...
User is currently offline
Ben Tasker Wednesday, 21 March 2012

Hi,

If you run

yum install yum-allowdowngrade

Then enable displaying of duplicate packages

nano /etc/yum.conf
Add showdupesfromrepos=1
exit and save

yum list php

Find the relevant package

yum --allow-downgrade install packagename
i.e.

yum --allow-downgrade install php-5.1.6

It'd be better to see if newer versions of Asterisk is compatible though!

Leave your comment

Guest
Guest Tuesday, 22 May 2012

Looking for our open source software?

viryasoftwarelogo

We release and support our open source software at Virya Software

Find us on

facebook    linkedin    twitter     youtube    vimeo    ViryaTechnologiesJoomlaResources    ViryaTechnologiesonTechnorati    rss

Virya Technologies Newsletter

Receive all the latest tips, news and reviews from Virya Technologies.

Come and meet us!

JUN
01

01.06.2012 07:30 - 09:30
Ipswich Connected Business Breakfast

JUN
01

01.06.2012 12:00 - 17:20
Ecademy BlackStar First Friday Working Lunch

JUN
14

14.06.2012 19:30 - 22:00
Joomla! User Group Suffolk Meeting

JUL
06

06.07.2012 07:30 - 09:30
Ipswich Connected Business Breakfast

JUL
06

06.07.2012 12:00 - 17:20
Ecademy BlackStar First Friday Working Lunch

The latest from Virya Technologies

Virya Technologies After an awesome #jab12 event we are offering 20% discount on all extensions until 7th June - use JAB12 coupon code at http://t.co/XrDJFRbq
Monday, 21 May 2012 07:46
twitter Follow Viryatech on Twitter