Downgrading PHP Versions in Centos/Redhat using Yum.
First you need to install allow downgrade option for Yum using the command:
# yum install yum-allowdowngrade
Configure yum.conf to include the following line “showdupesfromrepos=1” and the location of file is /etc/yum.conf
# vi /etc/yum.conf
Add the below line to this file.
showdupesfromrepos=1
Remove the current php package using the command:
# yum remove php*
Now List avaliable php packages using the command:
# yum list php
Now install the required version of php and required modules as follows (as an eg for php version 5.3.10):
# yum --allow-downgrade install php-5.3*
# yum --allow-downgrade install php-mbstring-5.3.10 php-mysql-5.3.10
# yum --allow-downgrade install php-gd-5.3.10
# yum --allow-downgrade install php-cli-5.3.10
# yum --allow-downgrade install php-mcrypt-5.3.10 php-standard-5.3.10 php-wddx-5.3.10 php-reader-5.3.10
I refered this link: http://almamunbd.blogspot.com/2010/01/downgrading-php-53-to-php-52-using-yum.html