PHP on CentOS 5.4

Dealing with CentOS isn’t always fun, but at least it is a distribution suitable for professional work. But all that doesn’t help if it comes to problems.

The problem today is called PHP. CentOS ships with PHP 5.1.6 which is slightly old. I don’t see that as a huge problem, but some applications like dotproject do as it uses some mbstring functions that aren’t available in 5.1.

What now? The solutions are quite simple: Either using an older version of dotproject or updating php. But only the latter one really makes sense to me.

As I need to do it the ‘CentOS way’, there should be some RPM packages provided. But as it comes down to dependencies and stuff, the only option left is the CentOS Testing repository. As I don’t want to update all of the packages to the latest testing version, I need to tell yum only to include the php packages. This is done in the repo-file that looks like this:

/etc/yum.repos.d/CentOS-Testing.repo:

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

‘yum update’ does the rest for us.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *