How to switch PHP version from 7.4 to 8.1?

General support questions
Post Reply
Boyjarv
Posts: 1
Joined: 2022/10/13 16:56:09

How to switch PHP version from 7.4 to 8.1?

Post by Boyjarv » 2022/10/13 16:58:55

Hi, I have followed instructions for the last hour to install PHP 8.1.1 and have been unsuccessful, can someone please help me?

Thanks

User avatar
remirepo
Posts: 447
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: How to switch PHP version from 7.4 to 8.1?

Post by remirepo » 2022/10/14 04:59:52

Which instructions have you tried to follow ?

PHP 8.1 is not available in official repositories

C7 is terribly old and close to its end of life, so for modern features, I recommend a modern distribution (C8 or C9 or some other RHEL clones)

Simple way is to use "remi" repository, see https://rpms.remirepo.net/wizard/
Remi's Repository - Forum - Blog

canuck15
Posts: 40
Joined: 2005/04/19 00:24:47

Re: How to switch PHP version from 7.4 to 8.1?

Post by canuck15 » 2023/01/09 15:02:24

Why is it that when someone asks a straightforward question there will almost always be people who feel the need to give lectures on how everyone should always be using the latest shiny object version instead?

Continuing to use CE7 is fine. Here is the simple direct answer to the question assuming you are already using remi for PHP. I am not sure what the procedure is if not using remi.

Code: Select all

yum install epel-release
yum install  http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum install yum-utils -y
yum-config-manager --enable remi-php81
yum update

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to switch PHP version from 7.4 to 8.1?

Post by TrevorH » 2023/01/09 15:27:51

You know you are replying to the Remi who maintains the php stack here, right?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

BShT
Posts: 584
Joined: 2019/10/09 12:31:40

Re: How to switch PHP version from 7.4 to 8.1?

Post by BShT » 2023/01/09 18:26:32

a professional strategy for migrating to a newer version should start now. Centos 7 will die soon and reporting this is always important

Post Reply