How can I disable these alerts?

These warnings are appearing when I access the settings, is there any way to disable them?

Hi @dpetrato22

Warning
The PHP version 7.3 you are using has reached its End of Life (EOL). You are strongly urged to upgrade to a current version, as using this version may expose you to security vulnerabilities and bugs that have been fixed in more recent versions of PHP.

The problem comes from the PHP version: please upgrade your PHP to PHP8

For the other ones, please provide a copy of the text, as I don’t understand Portuguese…

Hi @heurteph-ei

Excuse me hijacking this thread, but the PHP EOL banner is my issue too (albeit mine’s complaining about PHP 7.4). So I figured posting here might be better!?

Whilst PHP 7.4 is EOL upstream, I’m running Debian (11/Bullseye) and it is supported (with backported security updates) until July 2024 and even after that, it will receive LTS support (including PHP security fixes) until at least June 2026.

I get the reason why you have the warning by default. It makes sense for those that don’t know what they’re doing. But I’m a seasoned Linux sysadmin and I just want to disable the warning.

Whilst I could update PHP from a third party source, that would mean that I would lose advantage of the automated security updates to the system that I have (which currently includes PHP - so would arguably be less secure).

If Matomo didn’t (properly) support PHP7.4, that would be another good reason for the warning to not easily be disabled, but according to the docs it supports PHP 7.2+.

I’m sure that I could fairly easily patch it out, but I anticipate that I’d need to repatch it everytime I update it, so that’s pretty unsatisfactory.

Is there some way that I can disable the banner without hacking on the code? E.g. something like this: https://github.com/matomo-org/matomo/pull/17430#issuecomment-814938931 (except for the PHP version banner, rather than the cron error).

Thanks in advance.

I found the code and commenting it out works fine.

I still think that there should be an option to disable this for those that are using decent stable Linux distros where this isn’t actually an issue.

Here’s a diff for anyone else who is interested:

--- core/Plugin/ControllerAdmin.php.bak	2023-11-15 06:14:01.904105564 +0000
+++ core/Plugin/ControllerAdmin.php	2023-11-15 06:22:48.705438786 +0000
@@ -422,7 +422,7 @@
     private static function isPhpVersionEOL()
     {
         $phpEOL = '7.3';
-
+/*
         // End of security update for certain PHP versions as of https://www.php.net/supported-versions.php
         if (Date::today()->isLater(Date::factory('2022-11-28'))) {
             $phpEOL = '7.4';
@@ -433,7 +433,7 @@
         if (Date::today()->isLater(Date::factory('2024-11-25'))) {
             $phpEOL = '8.1';
         }
-
+*/
         return version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION, $phpEOL, '<=');
     }
 }

Hi @Jeremy_Davis
This warning is displayed only in admin pages. As this is just a warning (then just a good advice), most of Matomo users won’t need to hide this warning. But in your case, you are right, you can update the code in this way.