upgrade php version on centos linux

Subject:

centos repos only have the 5.3 versionnewer version: 5.6

rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

yum remove php-common # Need to remove this, otherwise it conflicts

yum install php56w

yum install php56w-mysql

yum install php56w-common

yum install php56w-pdo

yum install php56w-opcache php --version # Verify version has been upgraded

You can alternatively use php54w or php55w if required.

CAUTION!This may potentially break your website if it doesn't fully resolve all your dependencies, so you may need a couple of extra packages in some cases. See here for a list of other PHP 5.6 modules that are available.

If you encounter a problem and need to reset back to the default, you can use these commands:

sudo yum remove php56w

sudo yum remove php56w-common

sudo yum install php-common

sudo yum install php-mysql

sudo yum install php

2016-01-13 18:04:46gstlouis