Remove current PHP version and reinstall new PHP version.
Remove the current package.
a. yum list installed | grep php
b. yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
2. Add PHP 5.4 packages to yum.
a.rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
3. Check PHP-5.4 is available, you can use the command,
a. yum list available | grep php54
4.Now, install PHP-5.4 using the below command.
yum install php54w.x86_64 php54w-cli.x86_64 php54w-common.x86_64 php54w-gd.x86_64 php54w-ldap.x86_64 php54w-mbstring.x86_64 php54w-mcrypt.x86_64 php54w-mysql.x86_64 php54w-pdo.x86_64
Check the php version is installed using the command.
php -v
Remove the current package.
a. yum list installed | grep php
b. yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
2. Add PHP 5.4 packages to yum.
a.rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
3. Check PHP-5.4 is available, you can use the command,
a. yum list available | grep php54
4.Now, install PHP-5.4 using the below command.
yum install php54w.x86_64 php54w-cli.x86_64 php54w-common.x86_64 php54w-gd.x86_64 php54w-ldap.x86_64 php54w-mbstring.x86_64 php54w-mcrypt.x86_64 php54w-mysql.x86_64 php54w-pdo.x86_64
Check the php version is installed using the command.
php -v