Skip to content
Snippets Groups Projects
Commit 9938f671 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: FS#3189 - APS Installation Issues

parent b002da1d
No related branches found
No related tags found
No related merge requests found
......@@ -370,6 +370,19 @@ class ApsInstaller extends ApsBase
$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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment