Install PHP5.4
CentOS
First install the SCL repo:
yum install centos-release-SCL
Then install PHP 5.4 and these modules:
yum install php54 php54-php php54-php-gd php54-php-mbstring
You must also install the updated database module. This installs the new PHP 5.4 module for MySQL/MariaDB:
yum install php54-php-mysqlnd
Disable loading the old PHP 5.3 Apache module:
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php53.off
You should now have a /etc/httpd/conf.d/php54-php.conf file, which loads the correct PHP 5.4 module for Apache.
Finally, restart Apache:
service httpd restart
If not working do the below steps
find / -name php.ini
In my case I got my PHP in below path
/opt/rh/php54/root/etc/php.ini
run the below command
source /opt/rh/php54/enable