PHP 8 & 8.1 not tracking

I’m running Matomo 4.9.1 and when I use PHP 8 or 8.1 visitors are not getting tracked and I get a console error. When I downgrade the server to PHP 7.4 things are tracking fine. Any ideas?

Can you share the console error?
Do you have access to Matomo log file (and check the error server-side)?
Maybe you have this plugin installed:

it may give you some clues…

Philippe I see the following in my Apache Error Log file on the server

  • AH01630: client denied by server configuration: /matomo/vendor/phpunit

  • AH01630: client denied by server configuration: /matomo/config/global.ini.php

  • AH01630: client denied by server configuration: /matomo/tmp/

  • AH00529: /matomo/tmp/cache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that ‘/matomo/tmp/cache/’ is executable

  • Uncaught Error: Call to undefined function ignore_user_abort() in /matomo/piwik.php:15\nStack trace:\n#0 /matomo/matomo.php(13): include()\n#1 {main}\n thrown in /matomo/piwik.php on line 15’

These seem to be the most seen errors in the error log and I see all of the above multiple times over the last 5 days. I don’t see anything in the log files even though they are enabled because it appears as though the logs are being denied by the current configuration.

This might be the reason why it doesn’t work as this is one of the first lines of code that Matomo executes:

But I have no idea why it fails for you as ignore_user_abort should be available everywhere and even if it wasn’t the @ should avoid the error.

2 Likes

Thanks for the reply I have corrected that error in the server but I still get the same other issues popping up again and again. Any ideas? It is these error messages over and over again:

[Sat May 14 18:44:55.324487 2022] [authz_core:error] [pid 1245:tid 140341789247232] [client 149.28.240.57:0] AH01630: client denied by server configuration: /matomo/config/global.ini.php
[Sat May 14 18:44:54.271478 2022] [authz_core:error] [pid 1246:tid 140341764134656] [client 149.28.240.57:0] AH01630: client denied by server configuration: /matomo/lang/en.json
[Sat May 14 18:44:54.255006 2022] [authz_core:error] [pid 1247:tid 140342033729280] [client 149.28.240.57:0] AH01630: client denied by server configuration: /matomo/tmp/empty
[Sat May 14 18:44:54.238618 2022] [authz_core:error] [pid 1247:tid 140341822818048] [client 149.28.240.57:0] AH01630: client denied by server configuration: /matomo/tmp/
[Sat May 14 18:44:54.221427 2022] [core:crit] [pid 1246:tid 140341931923200] (13)Permission denied: [client 149.28.240.57:0] AH00529: /matomo/tmp/cache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/matomo/tmp/cache/' is executable

The other errors (“client denied by server configuration”) are not errors, but instead tell you that Apache blocked access to /config/global.ini.php as it should.
The request is probably coming from the Matomo system check which tests if the file is private as it should be.

Thanks Lukas. I appreciate it. It appears as though once the ignore user issue was fixed on the server PHP 8.1 is working properly I will keep you up to date if this no longer is the case