matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.87k stars 2.65k forks source link

Matomo Spams Opcache error #19748

Closed JE4GLE closed 2 years ago

JE4GLE commented 2 years ago

The following message is spammed 11 times on the diagnostics page and has something to do with the DiagnosticsExtended Plugin.

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)

Expected Behavior

The expected behavior is to not show the error message and fix the underlying error, if there is one.

Current Behavior

The error message is spammed 11 times.

Possible Solution

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. I think the if case can be used for this: https://github.com/Findus23/matomo-DiagnosticsExtended/blob/main/Diagnostic/OpcacheCheck.php#L44

Steps to Reproduce (for Bugs)

I guess this has to do with the Opcache installation of my hosting provider. URL: /index.php?date=last7&module=Installation&format=html&action=systemCheckPage&idSite=1&period=range&showtitle=1&random=2535&activated=

  1. Open the diagnostics page
  2. Reload the page to load data from the cache

Context

I created this error based on a suggestion on this forum post: https://forum.matomo.org/t/matomo-4-3-0-spams-opcache-error-message/41895/7

This information is in the diagnostics section and I guess it is interesting: PHP Disabled functions opcache_reset, opcache_get_status

Your Environment

API, Actions, Annotations, Bandwidth 4.0.2, BotTracker 2.07, BulkTracking, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CoreVue, CustomDimensions, CustomJsTracker, CustomVariables 4.1.1, Dashboard, DevicePixelRatio 2.0.0, DevicePlugins, DevicesDetection, Diagnostics, DiagnosticsExtended 0.1.9, Ecommerce, Events, Feedback, GeoIp2, Goals, Heartbeat, ImageGraph, Insights, Installation, Intl, IntranetMeasurable, KPIWidgets 1.1.1, LanguagesManager, Live, Login, MarketingCampaignsReporting 4.1.3, Marketplace, MobileMessaging, Modern 1.0.9, Monolog, Morpheus, MultiSites, Overlay, PagePerformance, PrivacyManager, ProfessionalServices, Provider 4.0.4, Proxy, Referrers, Resolution, RssWidget, SEO, ScheduledReports, SecurityInfo 4.0.2, SegmentEditor, SitesManager, Tour, TrackingSpamPrevention 4.1.3, Transitions, TwoFactorAuth, UserCountry, UserCountryMap, UserId, UserLanguage, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, Widgetize

Findus23 commented 2 years ago

Hi,

That error is totally independent of Matomo, but instead as the error message mentions in my experimental DiagnosticsExtended plugin (https://plugins.matomo.org/DiagnosticsExtended). So I'll be moving the issue there

Findus23 commented 2 years ago

It turns out one can't move issues between organisations/users, so I'll have to close this and I'd suggest either continuing the discussion in https://forum.matomo.org/t/matomo-4-3-0-spams-opcache-error-message/41895 or creating a new github issue in the repository of the plugin