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.93k stars 2.66k forks source link

[Bug] matomo just upgraded from 5.1.1 to 5.1.2 : console ok, web error 500 #22631

Open franck-paul opened 1 month ago

franck-paul commented 1 month ago

What happened?

Cannot use the web interface, only console is working

What should happen?

Should have web interface running, only got: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.58 (Unix) OpenSSL/1.1.1u mod_wsgi/4.9.4 Python/3.11 mod_fastcgi/mod_fastcgi-SNAP-0910052141 Server at localhost.local Port 443

How can this be reproduced?

Had Matomo 5.1.1 installed on local machine, PHP 8.3, MySQL 5.7, Apache 2.4, everything running. Update directly from web interface and got error 500 Nothing in Apache/PHP logs MySQL log: 2024-10-01T06:12:25.490880Z 563 [Note] Aborted connection 563 to db: 'matomo' user: 'root' host: 'localhost' (Got an error reading communication packets) 2024-10-01T06:12:34.321220Z 521 [Note] Aborted connection 521 to db: 'unconnected' user: 'root' host: 'localhost' (Got an error reading communication packets) Tried 127.0.0.1 instead of localhost (for db host) without any success.

Matomo version

5.1.2

PHP version

8.3.10

Server operating system

MacOS 15.0

What browsers are you seeing the problem on?

Firefox, Chrome

Computer operating system

MacOS 15.0

Relevant log output

2024-10-01T06:12:25.490880Z 563 [Note] Aborted connection 563 to db: 'matomo' user: 'root' host: 'localhost' (Got an error reading communication packets)
2024-10-01T06:12:34.321220Z 521 [Note] Aborted connection 521 to db: 'unconnected' user: 'root' host: 'localhost' (Got an error reading communication packets)

Validations

franck-paul commented 1 month ago

Note that all console command run fine (core:update, core:purge-old-archive-data, …)

franck-paul commented 1 month ago

It seems that the line 34 in file core/Intl/Locale.php : setlocale(LC_CTYPE, ''); causes the error on MacOS.

des-innocraft commented 1 month ago

@franck-paul Thank you for creating the issue and bringing this to our attention. We are trying to replicate the error and can we ask if you are still experiencing the issue?

If yes, did you encounter the error 500 after clicking this button on the Dashboard?

Screenshot 2024-10-21 at 4 40 05 AM
michalkleiner commented 1 month ago

This is most likely a duplicate of https://github.com/matomo-org/matomo/issues/21126. The issue wouldn't relate to the upgrade of Matomo, it's likely something else changed at the same time within the OS itself, such as a version upgrade of Apache or PHP etc. I don't think we have a solution to this for MacOS. @franck-paul are you by chance running Laravel Valet as your webserver setup?