As mentioned in a previous article, the coming Joomla! 1.6 will require PHP 5.2.x or above in order to work or even install. Recently I am planning to test drive Joomla! 1.6 Alpha, so the first thing on my to-do list is to upgrade the PHP 5.1.6 currently running on my testing server to PHP 5.2.x. Unfortunately the OS I am using, CentOS 5.3, doesn't yet officially provide the needed upgrade. That forced me to look for the upgrade from other sources.

One quick search revealed a few third parties repositories that may contain PHP 5.2.x. In the end I chose to retrieve the package from a semi-official CentOS repository, CentOS-Testing, which is the repository hosted by CentOS team to test out new or improved packages before putting them into one of their official channels. Those packages are not officially supported, and are not garanteed to function properly. Please use them with care.

To use CentOS-Testing repository, you need to first add it into YUM's repository configuration. Simply open the file /etc/yum.repos.d/CentOS-Base.repo with an editor and append the following lines:

[c5-testing]
name=CentOS-5 Testing 
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

# CentOS-Testing:
# !!!! CAUTION !!!!
# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
# They may or may not replace core CentOS packages, and are not guaranteed to function properly.
# These packages build and install, but are waiting for feedback from testers as to 
# functionality and stability. Packages in this repository will come and go during the 
# development period, so it should not be left enabled or used on production systems without due
# consideration. 

Please do not enable this repository. When you need to retrieve packages from it, just enable it on the command line. Now let's first check what the repository has to offer for PHP updates. On your shell command prompt enter this command:

yum --disablerepo=* --enablerepo=c5-testing check-update php*

The options in the command tell YUM to disable all repositories but c5-testing, and check any update packages with php at the beginning of their names. You will see a list of PHP related packages that may be used to update your PHP installation.

Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile

php.i386                  5.2.9-2.el5.centos     c5-testing
php-cli.i386              5.2.9-2.el5.centos     c5-testing
php-common.i386           5.2.9-2.el5.centos     c5-testing
php-gd.i386               5.2.9-2.el5.centos     c5-testing
php-imap.i386             5.2.9-2.el5.centos     c5-testing
php-mbstring.i386         5.2.9-2.el5.centos     c5-testing
php-mcrypt.i386           5.2.9-2.el5.centos.3   c5-testing
php-mysql.i386            5.2.9-2.el5.centos     c5-testing
php-pdo.i386              5.2.9-2.el5.centos     c5-testing

Quickly review the list. If those packages look reasonable, you can proceed to install them. Again, you must specifically disable all the other repositories.

yum --disablerepo=* --enablerepo=c5-testing update php*

Follow the on-screen instructions. You will have PHP 5.2.x installed on your CentOS server within minutes.

 

FaLang translation system by Faboba