PHP 5.2 on Centos upgrade


Many of our customers request upgrading php to the latest stable version. Unfortunately CentOS does not have anything beyond 5.1.* in the official repository.

We used to setup the remi repository as per http://rimuhosting.com/howto/php.jsp
However, Remi moved on to the latest 5.3 branch. Unfortunately the 5.3 branch is not compatible with most php CMS/blogs out there (ie. Drupal, Joomla, etc.) WordPress installations should be fine, unless the customer had installed some plugin that doesn’t like php5.3!

To upgrade php to 5.2 (latest) instead. You might want to use Jason Litka’s yum repository instead. More information on that can be found on his site: http://www.jasonlitka.com/yum-repository/
The repository is well maintained so far and it’s easy to set it up:

yum utterramblings http://www.jasonlitka.com/media/EL4/$ARCH
echo '[utterramblings]
name=Jasons Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
' > /etc/yum.repos.d/utterramblings.repo
yum --enablerepo=utterramblings update
yum --enablerepo=utterramblings install php

John adds:
Php 5.2.6 is also available in the Centos testing repo:

http://wiki.centos.org/AdditionalResources/Repositories

I feel more comfortable using these packages from Centos, rather than 3rd party ones, and they seem to be pretty stable.


One response to “PHP 5.2 on Centos upgrade”