How to Install PHP 5.2.X on CentOS 5
This is an old revision of the document!
The Remi repository install only supports the latest PHP version, which is currently 5.3.X. After searching around, I found PHP 5.2.X is still available from the CentOS testing repository.
To begin the install, start by adding the CentOS testing repository to yum
cd /etc/yum.repos.d wget http://dev.centos.org/centos/5/CentOS-Testing.repo
Then import the gpg key for this repository as follows:
rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
Now you are ready to install PHP 5.2.X from the CentOS repository (c5-testing).
yum --enablerepo=c5-testing install php
Or, If you are updating from an older PHP version:
yum --enablerepo=c5-testing update php
That’s it!
If you are doing a fresh LAMP install with Mysql:
yum --enablerepo=c5-testing install php-mysql mysql mysql-server /sbin/chkconfig --levels 235 mysqld on /etc/init.d/mysqld start
Or, to just update Mysql:
yum --enablerepo=c5-testing update mysql
Hope this helps...

