Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-utf8 setlocale can result in Fatal Error #18570

Open
Starker3 opened this issue Jan 4, 2022 · 3 comments
Open

Non-utf8 setlocale can result in Fatal Error #18570

Starker3 opened this issue Jan 4, 2022 · 3 comments
Labels
Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users.

Comments

@Starker3
Copy link
Contributor

Starker3 commented Jan 4, 2022

A user that has a non-utf8 locale set in their PHP configuration, for example:

export LC_ALL=fr_FR

export LANG=fr_FR

Can result in reports or tracking requests with non-utf8 character encoding being generated/inserted. For example:
image

This was fixed for this user by setting the following in the PHP configuration:

export LC_ALL=fr_FR.utf8

export LANG=fr_FR.utf8

Not sure if this is something that we could add a system check for or prevent in some other way?

Edit: This is the PHP configuration for the Matomo server, not the website being tracked.

@Starker3 Starker3 added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Jan 4, 2022
@Starker3 Starker3 changed the title Non-utf8 setlocale can result in incorrecltly encoded characters inserted in DB Non-utf8 setlocale can result in Fatal Error Jan 9, 2022
@Starker3
Copy link
Contributor Author

Starker3 commented Jan 9, 2022

Further clarification from the user, this can result in a Fatal Error when trying to show reports in the UI:
image

It seems that this is now happening when after switching to the following PHP configuration:

export LC_ALL=fr_FR.utf8

export LANG=fr_FR.utf8

Will ask for further clarification to confirm this.

@Starker3
Copy link
Contributor Author

FYI the character that likely caused this was:
%C3%89
Eg.

https://somedomain.tld/somepage.php?name=ABC%20D%C3%89%20%28FG1234%3AXYZ%29

@sgiehl
Copy link
Member

sgiehl commented Jan 18, 2022

@Starker3 do you know if the user is using utf8mb4 for database tables?

@sgiehl sgiehl added Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users.
Projects
None yet
Development

No branches or pull requests

3 participants