PHP Warning: is_dir() open_basedir restriction in class-tracking.php (Line 1124)
-
Hi Burst Statistics Team,
I am currently experiencing an issue where your plugin is generating a lot of PHP warnings in my server’s error log. It seems the plugin is trying to check the default PHP session directory (
/var/lib/php/sessions), which falls outside the allowedopen_basedirpaths on my hosting environment.While this doesn’t crash the website, it spams the error logs heavily on every tracking request made to
endpoint.php.Here is the exact error log snippet:
[error] 58043#58043: *696815 FastCGI sent in stderr: "PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File(/var/lib/php/sessions) is not within the allowed path(s): (/www/example_547/public:/www/example_547/mysqleditor:/www/example_547/web:/www/example_547/deploy:/www/example_547/deployment:/www/example_547/deployments:/www/example_547/tmp:/usr/share:/tmp:/dev/urandom) in /www/example_547/public/wp-content/plugins/burst-statistics/includes/Frontend/Tracking/class-tracking.php on line 1124" while reading response header from upstream, client: 131.117.154.132, server: example.de, request: "POST /wp-content/plugins/burst-statistics/endpoint.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php8.3-fpm-example.sock:", host: "example.de:65124", referrer: "https://example.de/depot/"Environment details:
- PHP Version: 8.3 (FPM)
- Trigger: POST requests to
/wp-content/plugins/burst-statistics/endpoint.php - File:
/includes/Frontend/Tracking/class-tracking.phpon line 1124
Suggestion: Could you please look into handling this more gracefully for environments with strict
open_basedirrestrictions? If it’s just a fallback check, perhaps silencing it via@is_dir()or checking the actualsession_save_path()could prevent the logs from filling up unnecessarily.Thank you for your help and for the great plugin!
Best regards,
Julian
You must be logged in to reply to this topic.