From 2ceb4453c5177c3093789a9e3236b5e532b5ab50 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 15 Aug 2023 16:19:22 -0600 Subject: [PATCH] If the config_file doesn't exist then redirect to the install.php --- resources/require.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/resources/require.php b/resources/require.php index 8f94e39c95..c2c5de0e5b 100644 --- a/resources/require.php +++ b/resources/require.php @@ -40,15 +40,21 @@ } } +//check if the config file exists + $config_exists = !empty($config_file) ? true : false; + +//config.conf file not found re-direct the request to the install + if (!$config_exists) { + header("Location: /core/install/install.php"); + exit; + } + //parse the config.conf file $conf = parse_ini_file($config_file); //set the include path set_include_path($conf['document.root']); -//check if the config file exists - $config_exists = !empty($config_file) ? true : false; - //set the server variables and define project path constant $_SERVER["DOCUMENT_ROOT"] = $conf['document.root']; $_SERVER["PROJECT_ROOT"] = $conf['document.root'];