Centos 7 php Upgrade

Currently php is set for 5.4. I tried several flavors of upgrades, but non of them seem to work including the “multiple versions” directions. I even almost broke my server trying.

From a cli , the newer version may work but in Virtualmin, not even detected. Now, phpMyAdmin is needing at least php 5.5 or higher. Ideas, suggestion, and instructions that work AND not break virtualmin would be good.



The multiple PHP instructions here should definitely work:


Note that they’ve been updated within the last few weeks, so if you haven’t tried it recently, you may have better luck now.

There is a caveat – there is a bug in Virtualmin that prevents it from detecting PHP 5.6 when installed as a second PHP version. But it should detect all PHP versions prior to that, such as 5.5. This bug will be corrected soon.


I looked at that. If I remember correctly, it’s missing quite a few libraries like mcrypt, etc.

Ok, Found the additional packages.

CentOS 7 x64
yum install https://www.softwarecollections.org/en/scls/remi/php55more/epel-7-x86_64/download/remi-php55more-epel-7-x86_64.noarch.rpm


CentOS 6 x64
yum install https://www.softwarecollections.org/en/scls/remi/php55more/epel-6-x86_64/download/remi-php55more-epel-6-x86_64.noarch.rpm

the run

yum install php55more

I also had to run the following command in terminal to get the system to “know” it’s there and report the correct version with php -v

scl enable mysql55 bash

and lastly, to enable php55 to be enabled after logout/login I had to create a shell file in /etc/profile.d


source scl_source enable php55

Now, all I need to do is get ZendOptimizer and Ioncube loader to work…

I have 5.5 and 5.6 on cenots 7.1 no issues. from my notes:

yum install scl-utils

wget https://www.softwarecollections.org/en/scls/rhscl/rh-php56/epel-7-x86_64/download/rhscl-rh-php56-epel-7-x86_64.noarch.rpm

yum install rhscl-rh-php56-*.noarch.rpm

yum install rh-php56

yum install rh-php56-php-mysqlnd rh-php56-php-gd rh-php56-php-xmlrpc rh-php56-php-bcmath rh-php56-php-mbstring rh-php56-php-pecl-xdebug rh-php56-php-xdebug-debuginfo rh-php56-php-pspell rh-php56-php-soap rh-php56-php-intl rh-php56-php-pecl-jsonc-debuginfo rh-php56-php-pecl-xdebu-debuginfo rh-php56-php-recode

scl enable rh-php56 bash

If you want to load PHP 5.6 and virtualmin to see it, you have to create a symlink in l/opt/rh/ called php56 pointing to rh-php56, then virtualmin will see it.

#ln /opt/rh/ ln -s rh-php56 php56

mcrypt is either in the package already installed or I added rh-php56-php-mcrypt from remi-php56more repo, just cant remember right now, but I do have it running.


Great, glad you guys were able to get PHP 5.6 working!

After the next release, the symlink workaround you did won’t be necessary, but in the meantime, that’s an excellent way to get that working.


Just wanted to say thanks a lot for this post. Was able to get things working on my old centos box with the help of these instructions!