Fix so fusionpbx doesn't fail on servers with php versions later than 5. (e.g. php7).
Also a few warning causes fixed. Also, one step along the way to allow freeswitch to be u freeswitch g freeswitch and fusionpbx to run www-data:www-data.
This commit is contained in:
@@ -221,7 +221,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$php_bin = 'php.exe';
|
||||
}
|
||||
else {
|
||||
$php_bin = 'php';
|
||||
$php_bin = 'php5';
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
@@ -658,7 +658,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
$sql = "SELECT * FROM v_users ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
foreach($assigned_user_uuids as $assigned_user_uuid) {
|
||||
if (isset($assigned_user_id)) foreach($assigned_user_uuids as $assigned_user_uuid) {
|
||||
$sql .= "and user_uuid <> '".$assigned_user_uuid."' ";
|
||||
}
|
||||
unset($assigned_user_uuids);
|
||||
|
||||
@@ -107,12 +107,13 @@ if (!class_exists('scripts')) {
|
||||
$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/scripts';
|
||||
}
|
||||
if (is_readable($dst_dir)) {
|
||||
recursive_copy($src_dir, $dst_dir);
|
||||
unset($src_dir, $dst_dir);
|
||||
recursive_copy($src_dir,$dst_dir);
|
||||
unset($src_dir);
|
||||
}else{
|
||||
throw new Exception("Cannot read from '$src_dir' to get the scripts");
|
||||
}
|
||||
chmod($dst_dir, 0774);
|
||||
chmod($dst_dir, 0775);
|
||||
unset($dst_dir);
|
||||
} else {
|
||||
throw new Exception("Scripts directory doesn't exist");
|
||||
}
|
||||
@@ -203,7 +204,7 @@ if (!class_exists('scripts')) {
|
||||
$tmp .= " php_bin = \"php.exe\";\n";
|
||||
}
|
||||
else {
|
||||
$tmp .= " php_bin = \"php\";\n";
|
||||
$tmp .= " php_bin = \"php5\";\n";
|
||||
}
|
||||
$tmp .= $this->correct_path(" document_root = [[".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."]];\n");
|
||||
$tmp .= "\n";
|
||||
|
||||
Reference in New Issue
Block a user