Till Brehm
2014-02-22 9938f6715246fe3f3af41112d83c7ba8e234ea8e
Fixed: FS#3189 - APS Installation Issues
1 files modified
13 ■■■■■ changed files
server/lib/classes/aps_installer.inc.php 13 ●●●●● patch | view | raw | blame | history
server/lib/classes/aps_installer.inc.php
@@ -370,6 +370,19 @@
        $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 */
        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;
            }
        }
        $this->putenv[] = 'DB_'.$db_id.'_TYPE=mysql';
        $this->putenv[] = 'DB_'.$db_id.'_NAME='.$newdb_name;