Centos – Upgrading to PHP 5.6 using Yum (REMI repo)

centoshttpdphp5

I would like to ask how to upgrade to PHP 5.6 on my CentOS machine using Yum + REMI repo.

For example, I already use the REMI repo for everything.

Now, after I change this line in /etc/yum.repos.d/remi.repo:

[remi-php56]
enabled=0

to

enabled=1

I can now see the PHP 5.6.2 package on the repo. If I simpy update as such yum update php, will that update the entire PHP package (ie php_mysql, pdo, etc) ?

And what about mod_php in httpd? (Apache)?

Or are there other steps I need to take?

Best Answer

You made need to install php56 explicitly, e.g.:

yum install php56 php56-php-cli  php56-php-common php56-php-pear php56-php-pecl-jsonc php56-php-pecl-zip php56-php-process php56-php-xml php56-runtime

and then remove the old php, e.g.

yum remove php55 php55-php-cli  php55-php-common php55-php-pear php55-php-pecl-jsonc php55-php-pecl-zip php55-php-process php55-php-xml php55-runtime

You can run yum list installed |grep php to see which PHP packages are already installed.

Related Topic