DEV Community

Discussion on: Upgrading to PHP 7.4

Collapse
 
funnelxpert profile image
Peter Nyiri

Hi,
I am not an expert and having trouble updating to PHP 7.4 from 7.2.
I have a VPS, Apache-NGINX-Varnish, CentOS 7.7 and CWP Pro.
I did the steps to install:

sudo yum -y install dl.fedoraproject.org/pub/epel/epel...

sudo yum -y install rpms.remirepo.net/enterprise/remi-...

yum --enablerepo=remi-php74 install php

yum --enablerepo=remi-php74 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

sudo yum-config-manager --enable remi-php74

At this point php 7.4 seems to be installed, however php -v still returns 7.2 and CWP also shows the old version.

What else do I need to do to with Apache/NGINX?

Server version: Apache/2.4.6 (CentOS)
Server MPM: prefork

I tried this:

sudo apt install libapache2-mod-php7.4

sudo: apt: command not found

Thanks.

Collapse
 
anandpushkar088 profile image
Pushkar Anand

Try sudo dnf -y install dnf-utils and sudo dnf module install php:remi-7.4

Collapse
 
funnelxpert profile image
Peter Nyiri

I use yum, not dnf.

I already ran this:
sudo yum -y install yum-utils

Package yum-utils-1.1.31-52.el7.noarch already installed and latest version
Nothing to do

Also I just remembered that my server is running on php-cgi, not php-fpm

Thread Thread
 
anandpushkar088 profile image
Pushkar Anand

I have no experience with CGI.