Sometimes, some pages I open on the Matomo dashboard have 11 warning banners at the top with the following message:
WARNING: /var/www/vhosts/h149549.web219.dogado.net/httpdocs/matomo/plugins/DiagnosticsExtended/Diagnostic/OpcacheCheck.php(51): Warning - opcache_get_status() has been disabled for security reasons - Matomo 4.3.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: Installation, Action: systemCheckPage, In CLI mode: false)
The line numbers between OpcacheCheck.php(xx) include 51, 52, 53, 54, 58, 59, 60, 61, 62 and 63
Unfortunately, I canât reproduce the error every time or recognize a pattern.
This error message doesnât come from Matomo, but instead from my plugin (DiagnosticsExtended).
I use opcache_get_status() to check the status of your OPcache setup in the system check.
But apparently in your setup even calling that function is disallowed and causes the warning.
I just released 0.1.5 of that plugin which should avoid this warning.
Thanks for the quick fix and excuse my late response!
I get another error, which might be related to this one:
WARNING: /âŚ/matomo/plugins/DiagnosticsExtended/Diagnostic/OpcacheCheck.php(52): Notice - Trying to access array offset on value of type null - Matomo 4.4.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: Installation, Action: getSystemCheck, In CLI mode: false)
Just to inform you that I get 10 warnings like these when I go to âUsersâ
WARNING: /plugins/DiagnosticsExtended/Diagnostic/OpcacheCheck.php(52): Notice - Trying to access array offset on value of type null - Matomo 4.7.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: Installation, Action: getSystemCheck, In CLI mode: false)
Wanted to report that this error message is still spammed 11 times in 4.11.0
WARNING: /plugins/DiagnosticsExtended/Diagnostic/OpcacheCheck.php(52): Notice - Trying to access array offset on value of type null - Matomo 4.11.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: Installation, Action: getSystemCheck, In CLI mode: false)
A fix would be very nice!
I think the message could mean that opcache is disabled and a warning message can be displayed in this case. But Iâm not sure.
if (!Utils::booleanIni("opcache.enable") || !opcache_get_status()) {
? (That also isnât a proper fix as it will then return that opcache is disabled even though it is enabled in your setup and just the status doesnât work)
I donât have access to a Matomo setup at the moment, so I can only guess. But it seems still weird that your PHP responds that opcache is enabled, but at the same time refuses to give any status about opcache.
I reduced the error message to one single error, but I guess this also explains the cause of the error
WARNING: /plugins/DiagnosticsExtended/Diagnostic/OpcacheCheck.php(44): Warning - opcache_get_status() has been disabled for security reasons - Matomo 4.11.0 - Please report this message in the Matomo forums (please do a search first as it might have been reported already) (Module: Installation, Action: getSystemCheck, In CLI mode: false)
I guess my provider disabled the function, because it is a shared host. Can be detected using
It is a very special use case, but it is one . I guess an error message like âopcache is enabled in your configuration, but blocked for security reasonsâ or something like that could work.