Updating Icinga to PHP 8.0

  • Icinga Web 2 version
    icingaweb2-2.10.1-1.el7

  • Used modules and their versions (System - About)
    Incubator 0.17.0
    IPL v0.5.0
    Reactbundle 0.9.0
    Director v1.9.1

  • Web browser used
    Google Chrome

  • Icinga 2 version used (icinga2 --version)
    Icinga 2 r2.13.3-1

  • PHP version used (php --version)
    PHP 8.0.20 on System
    PHP 7.3 in Icingaweb2

  • Server operating system and version
    CentOS 7 - centos-release-7-9.2009.1.el7.centos.x86_64

Hello everyone,

I was told I should update the PHP Version of our icingaweb2 from PHP 7.3 to PHP 8.0. I already updated the PHP Version on our Serversystem but I did not find any way to update the PHP Version in Icingaweb2 so it will use PHP 8.0 instead of the 7.3 Version.

As I installed Icinga lately, I followed the installationorder of Icinga (icingaweb2/doc at master · Icinga/icingaweb2 · GitHub) but it required rh-php73 as dependency, so I installed it with PHP 7.3, which was obviously not wanted.

I know this might be a dumb question, but I didn’t find any hint to update just the PHP Version, only how to update the icingaweb2 version, which is up to date, beacause it’s a 3 days old installation :slight_smile:

Best of regards:
Daniel

Edit:
In the meantime, I had a look into yum list | grep fpm:
rh-php73-php-fpm.x86_64 7.3.29-1.el7 @centos-sclo-rh
fpm2.x86_64 0.79-12.el7 epel
php-fpm.x86_64 8.0.20-1.el7.remi remi-php80
php54-php-fpm.x86_64 5.4.45-19.el7.remi remi-safe
php55-php-fpm.x86_64 5.5.38-13.el7.remi remi-safe
php56-php-fpm.x86_64 5.6.40-33.el7.remi remi-safe
php70-php-fpm.x86_64 7.0.33-33.el7.remi remi-safe
php71-php-fpm.x86_64 7.1.33-20.el7.remi remi-safe
php72-php-fpm.x86_64 7.2.34-11.el7.remi remi-safe
php73-php-fpm.x86_64 7.3.33-3.el7.remi remi-safe
php74-php-fpm.x86_64 7.4.30-1.el7.remi remi-safe
php80-php-fpm.x86_64 8.0.20-1.el7.remi remi-safe
php81-php-fpm.x86_64 8.1.7-1.el7.remi remi-safe
php82-php-fpm.x86_64 8.2.0~alpha2-7.el7.remi
rh-php70-php-fpm.x86_64 7.0.27-2.el7 centos-sclo-rh
rh-php71-php-fpm.x86_64 7.1.30-2.el7 centos-sclo-rh
rh-php72-php-fpm.x86_64 7.2.24-1.el7 centos-sclo-rh

As EL7’s way to provide different versions of the same software in form of SCLs does not allow for the same flexibility as EL8’s modules, it is required to define dependencies during build and the user has to stick with this. So the only way for EL7 with a newer PHP version would be Icinga Web 2 being packaged for a newer SCL (issue for this is SCL: Bump PHP version (7.3 is EOL soon) · Issue #226 · Icinga/icinga-packaging · GitHub). The other option would be EL8 (or EL9) if Icinga would not have stopped providing community packages for it (issue for this is rpm packages for RHEL8-clones · Issue #234 · Icinga/icinga-packaging · GitHub).

I solved it. It was easier than I thought:

  1. yum install --disablerepo=* --enablerepo=remi-php80 php-fpm
  2. systemctl start php-fpm
  3. yum install php-intl
  4. systemctl enable php-fpm
  5. systemctl disable rh-php73-php-fpm
  6. systemctl restart php-fpm

I also had to reinstall some dependencies, which I saw after our LDAP wasn’t available after fpm restart anymore. Here’s a List of needed Dependencies:

yum install php-intl php-ldap php-gd php-mbstring php-zip php-json php-soap

I found this out when I made a diff of the old rh-php73* Modules and the new php80 Modules. They were missing in the new installation.

I hope this helps somebody in the future

1 Like