Fix the path for config.php for both index.php and login.php.
This commit is contained in:
parent
2f36c6b407
commit
8e3be308e8
|
|
@ -28,14 +28,13 @@ include "root.php";
|
||||||
//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['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
||||||
//do nothing
|
//do nothing
|
||||||
|
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) {
|
||||||
|
//original directory
|
||||||
} elseif (file_exists("/etc/fusionpbx/config.php")){
|
} elseif (file_exists("/etc/fusionpbx/config.php")){
|
||||||
//linux
|
//linux
|
||||||
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
|
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
|
||||||
//bsd
|
//bsd
|
||||||
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")){
|
} else {
|
||||||
//original directory
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
header("Location: ".PROJECT_PATH."/resources/install.php");
|
header("Location: ".PROJECT_PATH."/resources/install.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,13 @@ include "root.php";
|
||||||
//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['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
||||||
//do nothing
|
//do nothing
|
||||||
|
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) {
|
||||||
|
//original directory
|
||||||
} elseif (file_exists("/etc/fusionpbx/config.php")){
|
} elseif (file_exists("/etc/fusionpbx/config.php")){
|
||||||
//linux
|
//linux
|
||||||
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
|
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
|
||||||
//bsd
|
//bsd
|
||||||
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")){
|
} else {
|
||||||
//original directory
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
header("Location: ".PROJECT_PATH."/resources/install.php");
|
header("Location: ".PROJECT_PATH."/resources/install.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue