From f3513ea80e7990b8dba71793b80a5d8967029415 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 14 Jun 2024 20:31:09 +0200 Subject: [PATCH] Update script path in shell_exec command Changed the script path in the shell_exec command to include a forward slash before 'script.php' for correct execution. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 4ad662a..8acb04b 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ if($_SERVER["REQUEST_URI"] == '/metrics') { header('Content-Type: text/plain; version=0.0.4'); $config = getenv('CONFIG_FILE'); $phpbin = getenv('PHP_BINARY'); - $output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' ' . $_SERVER['DOCUMENT_ROOT'] . 'script.php'); + $output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' ' . $_SERVER['DOCUMENT_ROOT'] . '/script.php'); echo $output; } elseif ($_SERVER["REQUEST_URI"] == '/config') { header('Content-Type: application/json');