Upgrading PHP on Centos 6.5 (Final)

Upgrading PHP on CentOS 6.5 (Final)

As Jacob mentioned, the CentOS packages repo appears to only have PHP 5.3 available at the moment. But these commands seemed to work for me...

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

(Thanks Fabrizio Bartolomucci)

How to solve php versions mis-match (Centos 6)

While upgrade from 3rd party repository to remi should work smoothly (this being a best effort), you have been hitten by an (old) issue, php-dbg should obsolete php56w-phpdbg. This have ben fixed, and will be in next update.

For now, simply remove this debugger before the upgrade.

yum remove php56w-phpdbg
yum update
yum install php-dbg

As usually, see the Wizard instructions.

P.S. webtatic seems a dead project, no update for ~1 year, so everybody should migrate to a better alternative, such as "remi" repository.

centos 6.9 cpanel php 5.6 upgrade to php7

You should use EasyApache4 from the WHM interface. It will install php 5.5.x, php 5.6.x, php 7.x and even php 7.1.x. Then using MultiPHP from the same WHM interface you can customize the default php version on the server and also different php vesions for your cPanel users.

Do not manually install or delete php packages on the server or default php packages provided by cPanel. You risk to break stuff on the server which will lead to functionality issues.

Upgrading from php 5.5.x to 5.6.x on CentOS 6.7

This is the easiest way that worked for me: To install PHP 5.6 on CentOS 6 or 7:

CentOS 6. Enter the following commands in the order shown:

yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget https://centos6.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath

CentOS 7. Enter the following commands in the order shown:

yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget https://centos7.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath

See how to upgrade to PHP 7 and more at:
http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html

how to update php 5.3 to 5.4 in centos 6 without error?

Error: Package: php-pecl-jsonc-1.3.10-1.el6.remi.5.4.x86_64 (remi)

Updated By: php-common-5.6.30-2.el6.remi.x86_64 (remi-test)

Disable "remi-test" (excepted if you want to test unstable packages, but in this case, you need, at least php 5.6, in "remi-php56")



Related Topics



Leave a reply



Submit