Container.php(68): Deprecated; Container.php(73): Deprecated

I updated PHP from 7.3 to 8.1. I am now getting these errors:

WARNING: \libs\HTML\QuickForm2\Container.php(68): Deprecated - Return type of HTML_QuickForm2_ContainerIterator::hasChildren() should either be compatible with RecursiveArrayIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice - Matomo 4.6.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: MultiSites, Action: index, In CLI mode: false)

WARNING: \libs\HTML\QuickForm2\Container.php(73): Deprecated - Return type of HTML_QuickForm2_ContainerIterator::getChildren() should either be compatible with RecursiveArrayIterator::getChildren(): ?RecursiveArrayIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice - Matomo 4.6.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: MultiSites, Action: index, In CLI mode: false)

on page index.php?module=MultiSites&action=index&idSite=1&period=range&date=previous30


Click to view System Check

Mandatory checks

PHP version >= 7.2.5:

:heavy_check_mark: 8.1.0

PDO extension:

:heavy_check_mark:

PDO\MYSQL extension:

:heavy_check_mark:

MYSQLI extension:

:heavy_check_mark:

Other required extensions:

:heavy_check_mark: zlib :heavy_check_mark: json :heavy_check_mark: filter :heavy_check_mark: hash :heavy_check_mark: session

Required functions:

:heavy_check_mark: debug_backtrace :heavy_check_mark: eval :heavy_check_mark: hash :heavy_check_mark: gzcompress :heavy_check_mark: gzuncompress :heavy_check_mark: pack

Required PHP configuration (php.ini):

:heavy_check_mark: session.auto_start = 0 :heavy_check_mark: max_execution_time = 0 OR = -1 OR >= 30

Directories with write access:

:heavy_check_mark: $DOC_ROOT\tmp :heavy_check_mark: $DOC_ROOT\tmp\assets :heavy_check_mark: $DOC_ROOT\tmp\cache :heavy_check_mark: $DOC_ROOT\tmp\climulti :heavy_check_mark: $DOC_ROOT\tmp\latest :heavy_check_mark: $DOC_ROOT\tmp\logs :heavy_check_mark: $DOC_ROOT\tmp\sessions :heavy_check_mark: $DOC_ROOT\tmp\tcpdf :heavy_check_mark: $DOC_ROOT\tmp\templates_c

Optional checks

Required Private Directories:

:heavy_check_mark: All private directories are inaccessible from the internet.

Recommended Private Directories:

:heavy_check_mark: All private directories are inaccessible from the internet.

File integrity:

:heavy_check_mark:

64-bit PHP Binary:

:heavy_check_mark:

Tracker status:

:heavy_check_mark:

Memory limit:

:heavy_check_mark: 2058M

Time zone:

:heavy_check_mark:

Open URL:

:heavy_check_mark: curl

PageSpeed disabled:

:heavy_check_mark:

GD > 2.x + Freetype (graphics):

:heavy_check_mark:

Other extensions:

:heavy_check_mark: json :heavy_check_mark: libxml :heavy_check_mark: dom :heavy_check_mark: SimpleXML :heavy_check_mark: openssl

Other functions:

:heavy_check_mark: shell_exec :heavy_check_mark: set_time_limit :heavy_check_mark: mail :heavy_check_mark: parse_ini_file :heavy_check_mark: glob :heavy_check_mark: gzopen :heavy_check_mark: md5_file

Filesystem:

:heavy_check_mark:

Setup Cron (faster report loading):

:warning: Warning: For optimal performance and a speedy Matomo, it is highly recommended to set up a crontab to automatically archive your reports, and to disable browser triggering in the Matomo settings. Learn more.

Setup Cron - Managing processes via CLI:

not supported (optional) (Reasons: not supported on windows, could not find our pid (from getmypid()) in the output of ps x, awk is not available or did not run as we would expect it to) learn more

Database abilities:

:heavy_check_mark: UTF8mb4 charset :heavy_check_mark: LOAD DATA INFILE :heavy_check_mark: CREATE TEMPORARY TABLES :heavy_check_mark: Changing transaction isolation level

Max Packet Size:

:heavy_check_mark:

Forced SSL Connection:

:heavy_check_mark:

Geolocation:

:heavy_check_mark: geoip2php (continent_code, continent_name, country_code, country_name, region_code, region_name, city_name, postal_code, lat, long)

Update over HTTPS:

:heavy_check_mark:

Writable JavaScript Tracker (“/matomo.js” & “/piwik.js”):

:heavy_check_mark:

Informational results

Matomo Version:

4.6.1

Matomo Update History:

4.5.0,4.4.1,4.3.1,4.3.0-b3,4.2.1,4.1.1

Matomo Install Version:

Unknown - pre 3.8.

Latest Available Version:

4.6.1

Is Git Deployment:

0

PHP_OS:

WINNT

PHP_BINARY:

C:\64bit\Apache24\bin\httpd.exe

PHP SAPI:

apache2handler

Timezone Version:

2021.5

PHP Timezone:

UTC

PHP Time:

1638420216

PHP Datetime:

2021-12-02 04:43:36

PHP INI max_execution_time:

30

PHP INI post_max_size:

8M

PHP INI max_input_vars:

1000

PHP INI zlib.output_compression:

Curl Version:

7.77.0, OpenSSL/1.1.1c

Suhosin Installed:

0

DB Prefix:

piwik_

DB Charset:

utf8mb4

DB Adapter:

PDO\MYSQL

MySQL Version:

10.6.5-MariaDB-log

Num Tables:

286

Browser Segment Archiving Enabled:

1

Development Mode Enabled:

0

Internet Enabled:

1

Multi Server Environment:

0

Auto Update Enabled:

1

Custom User Path:

0

Custom Include Path:

0

Release Channel:

latest_stable

Plugins Activated:

API, Actions, Annotations, BulkTracking, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CoreVue, CustomDimensions, CustomJsTracker, CustomVariables 4.0.1, Dashboard, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, Events, Feedback, GeoIp2, Goals, Heartbeat, ImageGraph, Insights, Installation, Intl, IntranetMeasurable, LanguagesManager, Live, Login, Marketplace, MobileAppMeasurable, MobileMessaging, Monolog, Morpheus, MultiSites, Overlay, PagePerformance, PrivacyManager, ProfessionalServices, Proxy, Referrers, ReferrersManager 4.0.1, Resolution, RssWidget, SEO, ScheduledReports, SegmentEditor, SitesManager, Tour, Transitions, TreemapVisualization 4.0.1, TwoFactorAuth, UserCountry, UserCountryMap, UserId, UserLanguage, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, Widgetize

Plugins Deactivated:

DBStats, IP2Location 4.0.6, Provider 4.0.3, TagManager

Plugins Invalid:

Server Info:

Apache/2.4.39 (Win64) OpenSSL/1.1.1c PHP/8.1.0

Had visits in last 1 day:

1

Had visits in last 3 days:

1

Had visits in last 5 days:

1

Archive Time Last Started:

1479419542

Archive Time Last Finished:

1479419590

User Agent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

Browser Language:

en-us,en

Total Invalidation Count:

1483

In Progress Invalidation Count:

0

Scheduled Invalidation Count:

1483

Earliest invalidation ts_started:

Latest invalidation ts_started:

Earliest invalidation ts_invalidated:

2020-12-08 00:43:01

Latest invalidation ts_invalidated:

2021-12-02 00:54:46

Number of segment invalidations:

0

Number of plugin invalidations:

0

List of plugins being invalidated:

Anonymize Referrer:

Do Not Track enabled:

1

got some more:

WARNING: \core\CliMulti\Process.php(290): Deprecated - trim(): Passing null to parameter #1 ($string) of type string is deprecated - Matomo 4.6.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)

WARNING: \core\CliMulti\Process.php(308): Deprecated - trim(): Passing null to parameter #1 ($string) of type string is deprecated - Matomo 4.6.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)

WARNING: \core\CliMulti\Process.php(258): Deprecated - trim(): Passing null to parameter #1 ($string) of type string is deprecated - Matomo 4.6.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)

on page: /index.php?module=Installation&action=systemCheckPage&idSite=1&period=range&date=previous30&showtitle=1&random=1227

You should probably migrate to the last version of Matomo:

But some bugs are still present:

this time got more info in the error text:

The description for Event ID 2 from source PHP-8.1.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

php
PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in D:\matomo\core\CliMulti\Process.php on line 290

The locale specific resource for the desired message is not present

What should I do?

I added a comment in the Make Matomo compatible with PHP8.1 GitHub request…

1 Like