3

My current setup of Webmin/Virtualmin has PHP 5.6 and 7.2. More and more composer packages have a requirement of PHP 7.4. I don't want to have 7.4 as the default PHP, I have sites on the server that need 5.6 (I know, not great but it's the way it is), so I'm trying to get 7.4 installed in the same structure as 7.2, in the /opt/rh folder.

The version of Linux is "CentOS Linux release 7.8.2003 (Core)"

I've tried to do this about 5 times and failed each time, there is just no information (that I can find) out there to say how to do this. Any help would be massively appreciated.

Mike
  • 182
  • 1
  • 3
  • 15

2 Answers2

3

If you need to keep default version of PHP, make sure to install PHP 7.4 from [remi-safe] repos.

Install Remi Release repo and clear cache:

yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm && yum clean all

Install PHP 7.4 packages:

yum -y install php74-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd}

It's clearly described in our documentation page on how to install different versions of PHP for Virtualmin.

Ilia Ross
  • 13,086
  • 11
  • 53
  • 88
0

You can have couple version of php running in the same time. Check this Multiple PHP Version on Centos

dajmund
  • 82
  • 5
  • It's close but I don't have php 7.4 available (it's up to 7.3) when I run this command "sudo yum list rh-php7[0-9].x86_64" Do you have any idea how to get 7.4 into this list? – Mike Oct 15 '20 at 12:55
  • Before everthing run those to update your repository list `sudo yum install epel-release yum-utils -y` `sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm` – dajmund Oct 16 '20 at 09:14
  • RHSCL, and thus CentOS-scl, only provides PHP 7.2 and 7.3. – Remi Collet Oct 29 '20 at 09:00