Compare commits

...

2 Commits

Author SHA1 Message Date
b52abb69c7
Updated script execution path
The shell_exec command in index.php has been updated to include the document root in the script path. This change ensures that the correct script is executed regardless of the current working directory.
2024-06-13 14:33:48 +02:00
e4d78e054b
Updated Twig cache directory name
The cache directory name for the Twig environment has been updated. The previous hyphen-separated name 'twig-cache' has been replaced with an underscore-separated one, 'twig_cache'. This change ensures consistency in naming conventions across the project.
2024-06-13 14:32:50 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -2,5 +2,5 @@
header('Content-Type: text/plain; version=0.0.4');
$config = getenv('CONFIG_FILE');
$phpbin = getenv('PHP_BINARY');
$output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' script.php');
$output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' ' . $_SERVER['DOCUMENT_ROOT'] . 'script.php');
echo $output;

View File

@ -122,7 +122,7 @@ if(php_sapi_name() == 'cli' || $_SERVER["REQUEST_URI"] == '/metrics') {
$loader = new \Twig\Loader\FilesystemLoader('templates');
$twig = new \Twig\Environment($loader, [
'cache' => 'twig-cache',
'cache' => 'twig_cache',
]);
echo $twig->render('metrics.twig', ['config' => $config]);
}