Troubleshooting¶
Start with phpray status (see CLI) — it names the first
thing that is wrong in every case below.
Extension not loading¶
php -m | grep phpray prints nothing, or php -v fails:
- Wrong PHP version — the
.soin the release is per version (php8.3-glibc-x86_64will not load under 8.2). Matchphp -vto the artifact name. - ZTS vs NTS — build with
--enable-shared(ZTS) needs the ZTS variant; most distro PHP is NTS.php -i | grep Threadtells you. - Wrong libc — musl (Alpine) vs glibc (everything else). Alpine
containers need the
muslartifact. - Check
error_log/dmesgfor the loader message (missing symbols → wrong version or build).
No traces for a site¶
Run phpray diag <domain>; common causes in order:
- the URI is in
phpray.ignore_uris(or the site's.user.inisets it) phpray.mode=manualand no trigger is active (console/CLI) — switch tosmartor fire a profilephpray.enabled=0in a.user.ini/.htaccesscloser to the docroot (PERDIR directives overridephp.ini; the closest file wins)- the request was fast —
smartonly storesnormalat 200 ms and up; lowerphpray.smart_threshold_normalor useall phpray.profile_mode=off— traces still appear, just without the components table (expected, not a fault)
Collector not reading shm¶
phpray status shows "collector ok" but no data:
- the extension's
phpray.shm_path/phpray.shm_sizeand the collector's[reader].shm_pathmust match exactly (different PHP versions with different ini includes are a classic split) output_mode=fileon one side,shmon the other- shm on a full
/dev/shm— checkdf -h /dev/shm
Permission issues¶
/var/lib/phpraymust be owned by thephpraycollector user; if the extension writes files (output_mode=file|both), the PHP user (e.g.nobody,www-data, the per-user lsphp uid) must be able to write it — on multi-user boxes useshmmode so PHP never writes to the storage dir- on CageFS hosts the collector needs the shm path in the per-user allow
list (
/opt/cpanel/cloudlinux/…→lscpu.conf/CageFS templates)
Collecting a bug report¶
phpray report -o phpray-report.txt
journalctl -u phpray-collector --since "10 min ago" >> phpray-report.txt
Send the report, your PHP version and distro, and the exact
php -i | grep -E "phpray|extension_dir" output.