From ebd0e986ed11f2a34fb58cdd33efbfab192083ad Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Fri, 22 Apr 2016 05:26:17 -0400 Subject: [PATCH] Added PHP 7 check in installer and updater. --- server/lib/classes/aps_installer.inc.php | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 64e7dd2..d6ff4f7 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -370,6 +370,21 @@ $tmp = $app->db->queryOneRecord("SELECT value FROM aps_instances_settings WHERE name = 'main_database_login' AND instance_id = '".$app->db->quote($task['instance_id'])."';"); $newdb_login = $tmp['value']; + + /* Test if the new mysql connection is laready working to ensure that db servers in multiserver + setups get enough time to create the database */ + if($this->handle_type == 'install') { + for($n = 1; $n < 15; $n++) { + $link = mysql_connect($newdb_host, $newdb_login, $newdb_pw); + if (!$link) { + unset($link); + sleep(5); + } else { + unset($link); + break; + } + } + } $this->putenv[] = 'DB_'.$db_id.'_TYPE=mysql'; $this->putenv[] = 'DB_'.$db_id.'_NAME='.$newdb_name; @@ -539,6 +554,7 @@ curl_setopt($conn[$i], CURLOPT_TIMEOUT, 0); curl_setopt($conn[$i], CURLOPT_FAILONERROR, 1); curl_setopt($conn[$i], CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($conn[$i], CURLOPT_SSL_VERIFYPEER, 0); curl_multi_add_handle($mh, $conn[$i]); } @@ -681,6 +697,7 @@ curl_setopt($ch, CURLOPT_TIMEOUT, 0); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); if(curl_exec($ch) === false) $app->log(curl_error($ch), 1); fclose($fh); curl_close($ch); -- Gitblit v1.9.1