@StrangeRanger opened this Issue on December 16th 2022

I'm unsure if this problem is best described as a bug, but after recently updating to matomo 4.13.0 and updating system packages on my Ubuntu instance/server, I've been receiving emails about a PHP Deprecation for a certain file used by matomo. I'll provide the full email content below:

Subject:
Cron <www-data<a class='mention' href='https://github.com/home'>@home</a>> /usr/bin/php /var/www/analytics.randomserver.xyz/console core:archive --url=http://analytics.randomserver.xyz > /var/www/analytics.randomserver.xyz/matomo-archive.log

Body: 
PHP Deprecated: Function utf8_encode() is deprecated in /var/www/[analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php](http://analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php) on line 48 
ERROR [[2022-12-16 17:05:04](canary:event?ts=692931909.00)] 835835 Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-12-16&format=json&trigger=archivephp: 'PHP Deprecated: Function utf8_encode() is deprecated in /var/www/[analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php](http://analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php) on line 48 {"idarchives":[3346],"nb_visits":4}' 
ERROR [[2022-12-16 17:05:04](canary:event?ts=692931909.00)] 835835 Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-12-15&format=json&trigger=archivephp: 'PHP Deprecated: Function utf8_encode() is deprecated in /var/www/[analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php](http://analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php) on line 48 {"idarchives":[3207],"nb_visits":8}' 
ERROR [[2022-12-16 17:05:08](canary:event?ts=692931913.00)] 835835 Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2022-12-12&format=json&trigger=archivephp: 'PHP Deprecated: Function utf8_encode() is deprecated in /var/www/[analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php](http://analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php) on line 48 {"idarchives":[3351],"nb_visits":35}' 
ERROR [[2022-12-16 17:05:11](canary:event?ts=692931916.00)] 835835 Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2022-12-01&format=json&trigger=archivephp: 'PHP Deprecated: Function utf8_encode() is deprecated in /var/www/[analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php](http://analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php) on line 48 {"idarchives":[3356],"nb_visits":53}' 
ERROR [[2022-12-16 17:05:16](canary:event?ts=692931921.00)] 835835 Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2022-01-01&format=json&trigger=archivephp: 'PHP Deprecated: Function utf8_encode() is deprecated in /var/www/[analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php](http://analytics.randomserver.xyz/vendor/szymach/c-pchart/constants.php) on line 48 {"idarchives":[34093],"nb_visits":1658}' 
ERROR [[2022-12-16 17:05:16](canary:event?ts=692931921.00)] 835835 5 total errors during this script execution, please investigate and try and fix these errors. 
ERROR [[2022-12-16 17:05:16](canary:event?ts=692931921.00)] 835835 Uncaught exception: /var/www/[analytics.randomserver.xyz/core/CronArchive.php](http://analytics.randomserver.xyz/core/CronArchive.php)(625): 5 total errors during this script execution, please investigate and try and fix these errors. [Query: , CLI mode: 1] 

[Exception] 
5 total errors during this script execution, please investigate and try and fix these errors. 

core:archive [--url="..."] [--skip-idsites[="..."]] [--skip-all-segments] [--force-idsites[="..."]] [--skip-segments-today] [--force-periods[="..."]] [--force-date-last-n[="..."]] [--force-date-range[="..."]] [--force-idsegments="..."] [--concurrent-requests-per-website[="..."]] [--concurrent-archivers[="..."]] [--max-websites-to-process="..."] [--max-archives-to-process="..."] [--disable-scheduled-tasks] [--accept-invalid-ssl-certificate] [--php-cli-options[="..."]] [--force-all-websites] [--force-report[="..."]]

Context

The issue in of itself, doesn't seem to be causing me any trouble. But the way I have my server set up, I'm being sent these emails every hour, so I thought I'd go ahead and make an issue for this potential problem.

Your Environment

  • Matomo Version: 4.13.0
  • PHP Version: 8.1.13
  • Server Operating System: Ubuntu 22.04
  • Additionally installed plugins: Screenshot 2022-12-16 at 9 37 47 AMScreenshot 2022-12-16 at 9 38 09 AM
@sgiehl commented on December 19th 2022 Member

Hi @StrangeRanger. Thanks for reporting this. This exact error occurs in one of our dependencies. It has been updated in https://github.com/matomo-org/matomo/pull/20114 and it should be fixed with our next release.

This Issue was closed on December 19th 2022
Powered by GitHub Issue Mirror