step by step upgrade php5.4 to php5.6

step by step upgrade php5.4 to php5.6

How to Upgrade PHP version 5.4 to 5.6 on CentOS/RHEL 

we serve step by step upgrade php5.4 to 5.6 in centos 7 or  How to Upgrade PHP version 5.4 to 5.6 on CentOS/RHEL;

Step 1:

Install the Centos SCL repository

yum install centos-release-scl

upgrade php, php, php5.6, php56, php5.4 to 5.6, upgrade php5.4 to 5.6 in centos 7, How to Upgrade PHP version 5.4 to 5.6 on CentOS/RHEL, linuxtopic, linux topic, step by step, steps, step by step udgrade php,

Step 2:

List PHP5.6 Package
yum list rh-php56\*
upgrade php, php, php5.6, php56, php5.4 to 5.6, upgrade php5.4 to 5.6 in centos 7, How to Upgrade PHP version 5.4 to 5.6 on CentOS/RHEL, linuxtopic, linux topic, step by step, steps, step by step udgrade php,

Install 5.6

yum install rh-php56-php-devel

we serve step by step upgrade php5.4 to 5.6 in centos 7 or  How to Upgrade PHP version 5.4 to 5.6 on CentOS/RHEL;

yum install rh-php56-php rh-php56-php-devel rh-php56-php-mbstring rh-php56-php-gd rh-php56-php-fpm rh-php56-php-mysqlnd libxml2-devel

upgrade php, php, php5.6, php56, php5.4 to 5.6, upgrade php5.4 to 5.6 in centos 7, How to Upgrade PHP version 5.4 to 5.6 on CentOS/RHEL, linuxtopic, linux topic, step by step, steps, step by step udgrade php,

PHP 5.6 File Structure :


Configuration File (php.ini) Path           /opt/rh/rh-php56/root/etc
Loaded Configuration File                      /opt/rh/rh-php56/root/etc/php.ini
Scan this dir for additional .ini files      /opt/rh/rh-php56/root/etc/php.d
command path                         /opt/rh/rh-php56/root/bin/php

Step 3:

Check php version and disable 

php -v
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php54.off
mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/10-php54.off

Enable new php5.6
cp /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php56-php.conf /etc/httpd/conf.d/
cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-rh-php56-php.conf /etc/httpd/conf.modules.d/
cp /opt/rh/httpd24/root/etc/httpd/modules/librh-php56-php5.so /etc/httpd/modules/

Move old php file 

mv /bin/php /bin/php-5.4
Create Link 
ln -s /opt/rh/rh-php56/root/bin/php /bin/
Check Version 
php -v

Step 4:

Set Ownership in session folder & 

chown -R apache:apache /var/opt/rh/rh-php56/lib/php/session

Step 5:

Copy our old php.ini setting in new php.ini
cp /etc/php.ini /etc/opt/rh/rh-php56/

Restart httpd service &  Check php version in browser, Create phpinfo file using below command

systemctl restart httpd
echo "<?php phpinfo() ?>" > /var/www/html/info.php

Open Browser :


upgrade php, php, php5.6, php56, php5.4 to 5.6, upgrade php5.4 to 5.6 in centos 7, How to Upgrade PHP version 5.4 to 5.6 on CentOS/RHEL, linuxtopic, linux topic, step by step, steps, step by step udgrade php,
Previous
Next Post »