Replace config.php with config.conf

This commit is contained in:
FusionPBX 2022-10-10 19:34:55 -06:00 committed by GitHub
parent 93ec88629b
commit 09427c23ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 20 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2021 Portions created by the Initial Developer are Copyright (C) 2008-2022
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -28,35 +28,20 @@
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE); $conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']); set_include_path(parse_ini_file($conf[0])['document.root']);
//includes files
//start the session //start the session
ini_set("session.cookie_httponly", True); ini_set("session.cookie_httponly", True);
if (!isset($_SESSION)) { session_start(); } if (!isset($_SESSION)) { session_start(); }
//if config.php file does not exist then redirect to the install page //if config.php file does not exist then redirect to the install page
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) { if (file_exists("/usr/local/etc/fusionpbx/config.conf")){
//do nothing //BSD
} elseif (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) { } elseif (file_exists("/etc/fusionpbx/config.conf")){
//original directory //Linux
} elseif (file_exists($_SERVER["PROJECT_ROOT"]."/includes/config.php")) {
//move config.php from the includes to resources directory.
rename($_SERVER["PROJECT_ROOT"]."/includes/config.php", $_SERVER["PROJECT_ROOT"]."/resources/config.php");
} elseif (file_exists("/etc/fusionpbx/config.php")) {
//linux
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
//bsd
} else { } else {
header("Location: ".PROJECT_PATH."/core/install/install.php"); header("Location: ".PROJECT_PATH."/core/install/install.php");
exit; exit;
} }
//if not logged in, clear the session variables
//if (strlen($_SESSION["username"]) == 0) {
// session_unset();
// session_destroy();
//}
//adds multiple includes //adds multiple includes
require_once "resources/require.php"; require_once "resources/require.php";