This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
My new Virtualmin server is Centos 7 but the php version is PHP 5.4.16 which is old, no updates for it. How can I update that safely? Is there a safe repository I can use?
Please google up Centos 7 and backporting. There are huge amount of articles explaining what is going on. To put it short - your PHP is fine, updated and secured from all know bugs/exploits.
- I often come to the conclusion that my brain has too many tabs open. - Failing at desktop publishing & graphic design since 1994.
Configure the new repo to download PHP 7.1 and replace your old (current) php:
cd /etc/yum.repos.d/ vi remi-php71.repo --> In [remi-php71], be sure you have: enabled=1 vi remi.repo --> In [remi] be sure you have: enabled=0 vi remi-safe.repo --> in [remi-safe] be sure you have: enabled=1
You can have multiple PHP versions installed. I just installed 5.6.5 in addition to 5.4.16 in CentOS 7.3. I did it because I was running into software that wouldn't install unless PHP was higher than 5.4.
Most web software that I use which utilize php announced that they were no longer supporting php 5.4 about 3-6 months ago.
I haven't upgraded from 7 to 7.1 yet because 7.1 came out so close on the heels to 7.0 and I haven't read any security updates stating that you should. (coming from my old network infrastructure/security experience not that I'm any Linux expert by any stretch of the imagination)
My install of CentOS 7 already had a multi edition of php from 5.6 to 7.0. Of course Linode purposefully adds or subtracts items to make it easier to customize so I may have just been blessed.
Please google up Centos 7 and backporting. There are huge amount of articles explaining what is going on. To put it short - your PHP is fine, updated and secured from all know bugs/exploits.
- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.
I updated to PHP 7.1 with the following procedure:
1. install EPEL
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm
cd /etc/yum.repos.d/
vi remi-php71.repo
--> In [remi-php71], be sure you have: enabled=1
vi remi.repo
--> In [remi] be sure you have: enabled=0
vi remi-safe.repo
--> in [remi-safe] be sure you have: enabled=1
4 Update
yum clean all
yum update
php -v
I did this based on: http://ilovevirtualmin.com/tag/virtualmin-upgrade-php-5-3-to-php-5-4/.
Please check the recomendations on apache's php conf
Hope it helps
Carlos
You can have multiple PHP versions installed. I just installed 5.6.5 in addition to 5.4.16 in CentOS 7.3. I did it because I was running into software that wouldn't install unless PHP was higher than 5.4.
I followed the instructions here: https://virtualmin.com/documentation/web/multiplephp#toc-installing-php-...
With the exception that the rpm url returned a 404, so Used this one instead: https://www.softwarecollections.org/repos/rhscl/rh-php56/epel-7-x86_64/n...
Worked without any issues. Just need to visit any virtual domain that needs the higher version and select it.
Thank you, that worked perfectly!
Most web software that I use which utilize php announced that they were no longer supporting php 5.4 about 3-6 months ago.
I haven't upgraded from 7 to 7.1 yet because 7.1 came out so close on the heels to 7.0 and I haven't read any security updates stating that you should. (coming from my old network infrastructure/security experience not that I'm any Linux expert by any stretch of the imagination)
My install of CentOS 7 already had a multi edition of php from 5.6 to 7.0. Of course Linode purposefully adds or subtracts items to make it easier to customize so I may have just been blessed.