Rocky Linux 8.8 an PHP 8.1

Hello all,

I am a Joomla user and for a few days I have been getting a notice in the control panel that I have to update my PHP version which is now 8.0.30

I’m using Rocky Linux 8.8 and searching the internet I found that you can update your PHP version to 8.1 via the REMI repository with this command:

# dnf install php81

I have some questions:

The first is if this command would overwrite my current version of PHP to 8.1-4? I have run the command and it only tells me that it updates a few PHP modules, should I manually update the modules that don’t update or are compatible?

The second is if you plan to upgrade PHP to 8.1 from Rocky Linux 8.8 or if PHP 8.1 only works with Rocky Linux 9

Thank you

  • EL-8 provides PHP 7.4 (full distro life support) and 8.0
  • EL-9 provides PHP 8.0 (full distro life support) and 8.1

“remi repository” provides PHP 7.4 to 8.3 as base packages (modules) and as Software Collections.

I’m using Rocky Linux 8.8 and searching the internet I found that you can update your PHP version to 8.1 via the REMI repository with this command:

# dnf install php81

No (excepted if you want multiple versions)

I have some questions:

The first is if this command would overwrite my current version of PHP to 8.1-4? I have run the command and it only tells me that it updates a few PHP modules, should I manually update the modules that don’t update or are compatible?

For a proper repository configuration and usage, follow the Wizard instructions
https://rpms.remirepo.net/wizard/

The current version is 8.1.23

The second is if you plan to upgrade PHP to 8.1 from Rocky Linux 8.8 or if PHP 8.1 only works with Rocky Linux 9

More versions may come later as new streams (following Red Hat)

P.S. Please also remember that “remi repository” has its own support sites (IRC, forum, discord, github…)

1 Like

Thank you for your detailed answer remi.

Well, I do have several versions of PHP running on my server, but they are installed through the Software Collections Repository as I explain in my article: https://www.xn–apaados-6za.es/1195-instalar-y-ejecutar-multiples-versiones-de-php-con-virtualmin

The PHP 8.0.30 version I have is from REMI, this is a list of all of them:

# repoquery -a --installed | grep php
gd3php-0:2.3.3-8.el8.remi.x86_64
oniguruma5php-0:6.9.8-1.el8.remi.x86_64
php-0:8.0.30-1.el8.remi.x86_64
php-bcmath-0:8.0.30-1.el8.remi.x86_64
php-cli-0:8.0.30-1.el8.remi.x86_64
php-common-0:8.0.30-1.el8.remi.x86_64
php-fedora-autoloader-0:1.0.1-2.el8.remi.noarch
php-fpm-0:8.0.30-1.el8.remi.x86_64
php-gd-0:8.0.30-1.el8.remi.x86_64
php-imap-0:8.0.30-1.el8.remi.x86_64
php-intl-0:8.0.30-1.el8.remi.x86_64
php-mbstring-0:8.0.30-1.el8.remi.x86_64
php-mysqlnd-0:8.0.30-1.el8.remi.x86_64
php-opcache-0:8.0.30-1.el8.remi.x86_64
php-pdo-0:8.0.30-1.el8.remi.x86_64
php-pear-1:1.10.13-5.el8.remi.noarch
php-pecl-apcu-0:5.1.22-1.el8.remi.8.0.x86_64
php-pecl-geoip-0:1.1.1-14.el8.remi.8.0.x86_64
php-pecl-igbinary-0:3.2.14-1.el8.remi.8.0.x86_64
php-pecl-imagick-im6-0:3.7.0-7.el8.remi.8.0.x86_64
php-pecl-mcrypt-0:1.0.6-1.el8.remi.8.0.x86_64
php-pecl-memcached-0:3.2.0-1.el8.remi.8.0.x86_64
php-pecl-msgpack-0:2.2.0-1.el8.remi.8.0.x86_64
php-pecl-xmlrpc-0:1.0.0~rc3-1.el8.remi.8.0.x86_64
php-pecl-zip-0:1.22.2-1.el8.remi.8.0.x86_64
php-process-0:8.0.30-1.el8.remi.x86_64
php-soap-0:8.0.30-1.el8.remi.x86_64
php-sodium-0:8.0.30-1.el8.remi.x86_64
php-xml-0:8.0.30-1.el8.remi.x86_64
php-zstd-0:0.12.3-1.el8.remi.8.0.x86_64
php56-0:5.6-1.el8.remi.x86_64
php56-php-cli-0:5.6.40-39.el8.remi.x86_64
php56-php-common-0:5.6.40-39.el8.remi.x86_64
php56-php-fpm-0:5.6.40-39.el8.remi.x86_64
php56-php-gd-0:5.6.40-39.el8.remi.x86_64
php56-php-mbstring-0:5.6.40-39.el8.remi.x86_64
php56-php-mcrypt-0:5.6.40-39.el8.remi.x86_64
php56-php-mysqlnd-0:5.6.40-39.el8.remi.x86_64
php56-php-pdo-0:5.6.40-39.el8.remi.x86_64
php56-php-pear-1:1.10.13-1.el8.remi.noarch
php56-php-pecl-apcu-0:4.0.11-3.el8.remi.x86_64
php56-php-pecl-igbinary-0:2.0.8-1.el8.remi.x86_64
php56-php-pecl-jsonc-0:1.3.10-3.el8.remi.x86_64
php56-php-pecl-memcache-0:3.0.8-9.el8.remi.x86_64
php56-php-pecl-memcached-0:2.2.0-10.el8.remi.x86_64
php56-php-pecl-msgpack-0:0.5.7-3.el8.remi.x86_64
php56-php-pecl-zip-0:1.22.2-1.el8.remi.x86_64
php56-php-process-0:5.6.40-39.el8.remi.x86_64
php56-php-xml-0:5.6.40-39.el8.remi.x86_64
php56-runtime-0:5.6-1.el8.remi.x86_64
php74-0:7.4-3.el8.remi.x86_64
php74-php-bcmath-0:7.4.33-8.el8.remi.x86_64
php74-php-cli-0:7.4.33-8.el8.remi.x86_64
php74-php-common-0:7.4.33-8.el8.remi.x86_64
php74-php-fpm-0:7.4.33-8.el8.remi.x86_64
php74-php-gd-0:7.4.33-8.el8.remi.x86_64
php74-php-imap-0:7.4.33-8.el8.remi.x86_64
php74-php-intl-0:7.4.33-8.el8.remi.x86_64
php74-php-json-0:7.4.33-8.el8.remi.x86_64
php74-php-mbstring-0:7.4.33-8.el8.remi.x86_64
php74-php-mysqlnd-0:7.4.33-8.el8.remi.x86_64
php74-php-pdo-0:7.4.33-8.el8.remi.x86_64
php74-php-pecl-apcu-0:5.1.22-1.el8.remi.x86_64
php74-php-pecl-geoip-0:1.1.1-11.el8.remi.x86_64
php74-php-pecl-igbinary-0:3.2.14-1.el8.remi.x86_64
php74-php-pecl-imagick-im6-0:3.7.0-7.el8.remi.x86_64
php74-php-pecl-mcrypt-0:1.0.6-1.el8.remi.x86_64
php74-php-pecl-msgpack-0:2.2.0-1.el8.remi.x86_64
php74-php-pecl-zip-0:1.22.2-1.el8.remi.x86_64
php74-php-process-0:7.4.33-8.el8.remi.x86_64
php74-php-soap-0:7.4.33-8.el8.remi.x86_64
php74-php-xml-0:7.4.33-8.el8.remi.x86_64
php74-php-xmlrpc-0:7.4.33-8.el8.remi.x86_64
php74-runtime-0:7.4-3.el8.remi.x86_64
wbm-php-pear-2:1.6-1.noarch

If I execute the command # dnf install php81, would version 8.0.30 be overwritten or could I choose which version of PHP would run on each virtual server?

Again thanks,

PHP 8.0.30 is installed as the default version

If you follow the Wizard instructions for “single/default version”, it will be updated
If you follow the Wizard instructions for “multiple versions”, it will be installed beside the default version (like 5.6 and 7.4 are)

In your article, you explain how to use “php-cgi” which is probably the worst way (performance) to execute PHP, yous should use “php-fpm” instead, you can read:

1 Like

Alright, now I get it. Your answer has helped me a lot. (NOTE: I already use php-fpm on my servers, the article is old)

Hi remi, just to inform you that I have successfully installed PHP 8.1.23 on a system with Rocky Linux 8. I explain it in this article: https://www.xn–apaados-6za.es/73141-como-actualizar-php-8-1-rocky-linux-8-8

Thanks again for your help.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.