Rocky Linux 9 PHP 8 Nagios & mod_php

I’ve tried to install Nagios 4.4.9 on Rocky 9, but it’s much harder than I thought.
Ok, maybe just the very basic things are working, but with some extras like pnp4nagios it becomes a nightmare. One thing is, that in PHP8 some functions are deprecated.
But I also the the message “Apache rewrite module: not running within apache mod_php”.
But I’ve installed all the PHP8.1 stuff I’ve found.
dnf module list php
Last metadata expiration check: 3:22:42 ago on Thu 22 Jun 2023 07:47:26 AM CEST.
Rocky Linux 9 - AppStream
Name Stream Profiles Summary
php 8.1 [e] common [d], devel, minimal PHP scripting language

Hint: [d]efault, [e]nabled, disabled, [i]nstalled

Did anybody ever try this?
Any hints?
Thanks.

mod_php is the old way of the previous century to use PHP.
Modern installation uses php-fpm instead.

  • EL-8 uses php-fpm by default but mod_php is still available with some configuration changes (mostly switching apache to “prefork” MPM), which is bad for performance and security
  • EL-9 uses php-fpm, mod_php have been removed

If your app is not ready for PHP 8, perhaps you should consider EL-8 instead which has PHP 7.4, supported for the whole distribution life (until 2029)

Thanks for the information.
I’ve tried with Rocky 8.8 and PHP 7.4. It was still hard stuff, but I’ve found solutions in different forums for all the problems that occured. Now Nagios 4.4.9 including pnp4nagios seems to run.
Is PHP7.4 update really included in securit updates of Rocky 8? Because it’s EOL?
Thanks.

Yes, see Security Backporting Practice - Red Hat Customer Portal
(As Rocky is a clone of RHEL, it follows its policies)

Also see Red Hat Enterprise Linux Application Streams Life Cycle - Red Hat Customer Portal
PHP 7.4 => Retirement date: May 2029