-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade PHP from 7.4 to 8.1 #13
Comments
Step 2 comment
source: https://wiki.rockylinux.org/rocky/repo/ Status
Meanwhile, the Ansible role named 'base' in |
Step 3 commentThe docs from the Fedora project
In any event, Meza does already install the EPEL repository when Rocky Linux is your distro. What are my repos? Is EPEL installed?userx@localhost meza]$ sudo dnf install epel-release Last metadata expiration check: 0:24:32 ago on Thu 22 Feb 2024 09:09:53 PM EST. Package epel-release-8-19.el8.noarch is already installed. Dependencies resolved. Nothing to do. Complete! [userx@localhost meza]$
[userx@localhost meza]$
|
Step 4 commentRight now we're adding a couple tasks + variables in the apache-php role to install the Remi repo. However, in the larger picture, we should clean up and refactor the playbooks so that we can just include Jeff Geerling's epel and remi roles into our (site) playbook(s). |
Oddly ran into a problem with Ansible just hanging after adding the new tasks. Trying to troubleshoot that, discovered that we're actually using a fairly old Ansible (2.9.x) when 2.16 is the currently available core. If I'm reading it correctly, Ansible core 2.9 was EOL in 2022. Regardless of our need to upgrade Ansible (and troubleshoot the installation of PHP), we also need to refactor and simplify code paths to ensure all logic that applies to RHEL8 and Rocky8 is consolidated. One gotcha is that there is an old bug in how some ansible facts distinguish between RedHat and Rocky.
As a work-around, we can avoid using the opaque (but accurate)
|
Incompatibility revealed in upgrading PHP #13 This work was performed for NASA GRC-ATF by WikiWorks per NASA Contract NNC15BA02B.
This fixes issue #13 This work was performed for NASA GRC-ATF by WikiWorks per NASA Contract NNC15BA02B.
This post https://www.reddit.com/r/ansible/comments/13xdt6h/enabling_dnf_modules_through_ansible/ is an example of installing Remi and PHP8 using Ansible. |
Current version is unsupported
The current version is 7.4.33 (fpm-fcgi). This is unsupported in the PHP community, even from a security standpoint.
Target considerations
We can do this (even without upgrading Rocky Linux - which would entail more work). The best version to upgrade to on Rocky Linux 8 would be PHP 8.1.27 A near future upgrade to Rocky Linux 9.x will make it easier for us to further upgrade to PHP 8.2.x or even 8.3.x. (8.2.16 and 8.3.3 available at the time of writing as of 2024-02-22)
Constraints
A limiting constraint is the PHP support in MediaWiki core (and thus extensions). WMF has been slow to transition to newer PHP versions. The best we can do at present is upgrade to PHP 8.1 - with the risk that some extensions may not be compatible.
HowTo run PHP 8.1 on RockyLinux 8.x
Additional information
Operating system: EL8
Wanted PHP version: 8.1.27 (security only support through November 2024)
Type of install: single version (default)
Architecture: x86_64
The Remi Wizard tells us
CentOS 8 provides PHP version 7.4, 8.0 in its official repository
Command to enabled the CRB repository:
dnf config-manager --set-enabled powertools
Command to install the EPEL repository configuration package:
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Command to install the Remi repository configuration package:
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
You want a single version (We're not trying to run multiple versions of PHP simultaneously.) which means replacing base packages from the distribution
Packages have the same name as in the base repository, ie php-*
Some common dependencies are available in remi-safe repository, which is enabled by default
PHP version 8.1 packages are available for CentOS 8 in remi-modular repository
You have to enable the module stream for 8.1, and update the old version if installed:
dnf module switch-to php:remi-8.1
If no version is installed, command to install the php stream default profile:
dnf module install php:remi-8.1
Command to install additional packages (xxx for SAPI or extension name):
dnf install php-xxx
Command to install testing packages:
dnf --enablerepo=remi-modular-test install php-xxx
Command to check the installed version and available extensions:
php --version
php --modules
The text was updated successfully, but these errors were encountered: