Setting LC_CTYPE to an empty string kills PHP on MacOS using Laravel Valet
Author: michalkleinerCreated Aug 7, 2023Updated Oct 1, 2026
Labelsnot-in-changelogPotential Bug
Context
Not sure exactly what changed, whether update/upgrade related, but started receiving [pool valet] child 91253 exited on signal 6 (SIGABRT) after 0.485608 seconds from start error.
During debugging I found the call setlocale(LC_CTYPE, ''); in Locale.php is causing this. Different versions of PHP (8.0, 8.1, 8.2) same issue.
This prevents the whole Matomo app from starting correctly.
Expected Behavior
App starts and functions without issues.
Current Behavior
PHP crashes and doesn't load at all.
Steps to Reproduce (for Bugs)
Haven't managed to replicate it on other MacOS machine yet, but still worth creating the issue if someone comes across it. Then perhaps we can brainstorm how to fix this or document a workaround/an FAQ.
Your Environment
- Matomo Version: 5.0.0-b4 but also latest 4.x-dev
- PHP Version: 8.2.8
- Server Operating System: MacOS Ventura 13.4.1 running Laravel Valet with php installed via brew
- Additionally installed plugins:
- Browser: Brave
- Operating System: MacOS Ventura 13.4.1
Source: matomo-org/matomo