Till Brehm
2016-04-22 ebd0e986ed11f2a34fb58cdd33efbfab192083ad
server/lib/classes/aps_installer.inc.php
@@ -373,14 +373,16 @@
      
      /* Test if the new mysql connection is laready working to ensure that db servers in multiserver
         setups get enough time to create the database */
      for($n = 1; $n < 15; $n++) {
         $mysqli = new mysqli($newdb_host, $newdb_login, $newdb_pw, $newdb_name);
         if ($mysqli->connect_error) {
            unset($mysqli);
            sleep(5);
         } else {
            unset($mysqli);
            break;
      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;
            }
         }
      }
@@ -552,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]);
      }
@@ -694,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);