From 73de91c2d32ad7fdeb10e8eaee6069cdfaefd784 Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Sun, 2 Nov 2025 22:38:27 +0100 Subject: [PATCH] debug: Add logging for all *_FILE environment variables - Log all *_FILE variables from getenv() and $_ENV - Help diagnose why REDIS_PASSWORD_FILE is not set - Check if other *_FILE variables are present --- src/Framework/Core/AppBootstrapper.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Framework/Core/AppBootstrapper.php b/src/Framework/Core/AppBootstrapper.php index b65db17d..c4e64e61 100644 --- a/src/Framework/Core/AppBootstrapper.php +++ b/src/Framework/Core/AppBootstrapper.php @@ -74,6 +74,23 @@ final readonly class AppBootstrapper error_log("\$_SERVER['REDIS_PASSWORD_FILE']: " . $_SERVER['REDIS_PASSWORD_FILE']); } + // Check all *_FILE variables + error_log("------ ALL *_FILE VARIABLES ------"); + $allEnvVars = getenv(); + if ($allEnvVars !== false) { + foreach ($allEnvVars as $key => $value) { + if (str_ends_with($key, '_FILE')) { + error_log("$key: $value"); + } + } + } + error_log("------ \$_ENV *_FILE VARIABLES ------"); + foreach ($_ENV as $key => $value) { + if (is_string($key) && str_ends_with($key, '_FILE')) { + error_log("$key: $value"); + } + } + // Check if file exists at expected location $expectedFile = '/run/secrets/redis_password'; error_log("Expected file path: $expectedFile");