From 5acfc74a76418dcc7c6612e3e4c883aab60f2a46 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 30 Apr 2013 09:31:17 +0000 Subject: [PATCH] Fix the config.php directory path in the install.php. --- resources/install.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/install.php b/resources/install.php index 077d730215..ee7703b54f 100644 --- a/resources/install.php +++ b/resources/install.php @@ -446,15 +446,15 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist $tmp_config .= " error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ); //hide notices and warnings"; $tmp_config .= "\n"; $tmp_config .= "?>"; - if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) { + if (is_dir($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes")) { $config = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/config.php"; - } elseif (file_exists("/etc/fusionpbx/config.php")){ + } elseif (is_dir("/etc/fusionpbx")){ $config = "/etc/fusionpbx/config.php"; - } elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){ + } elseif (is_dir("/usr/local/etc/fusionpbx")){ $config = "/usr/local/etc/fusionpbx/config.php"; } else { - $config = PROJECT_PATH."/includes/config.php"; + $config = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/config.php"; } $fout = fopen($config,"w"); fwrite($fout, $tmp_config);