diff options
-rw-r--r-- | includes/install.inc | 7 | ||||
-rw-r--r-- | install.php | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/includes/install.inc b/includes/install.inc index 03ee3e4bd..b618594c8 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -287,7 +287,7 @@ abstract class DatabaseInstaller { return FALSE; } foreach ($this->tests as $test) { - $return = $this->runTestQuery($test['query'], $test['success'], $test['message'], !empty($tests['fatal'])); + $return = $this->runTestQuery($test['query'], $test['success'], $test['message'], !empty($test['fatal'])); if ($return === FALSE) { return FALSE; } @@ -303,11 +303,14 @@ abstract class DatabaseInstaller { */ protected function testConnect() { try { + // This doesn't actually test the connection. db_set_active(); + // Now actually do a check. + Database::getConnection(); $this->success[] = 'CONNECT'; } catch (Exception $e) { - drupal_set_message(st('Failed to connect to your %name database server. %name reports the following message: %error.<ul><li>Are you sure you have the correct username and password?</li><li>Are you sure that you have typed the correct database hostname?</li><li>Are you sure that the database server is running?</li></ul>For more help, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.', array('%error' => $e->getMessage(), 'name' => $this->name())), 'error'); + drupal_set_message(st('Failed to connect to your %name database server. %name reports the following message: <strong>%error</strong>.<ul><li>Are you sure that you have typed the correct database hostname?</li><li>Are you sure that the database server is running?</li><li>Are you sure you have the correct database name?</li><li>Are you sure you have the correct username and password?</li></ul>For more help, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.', array('%error' => $e->getMessage(), '%name' => $this->name())), 'error'); return FALSE; } } diff --git a/install.php b/install.php index 447e38266..89d694716 100644 --- a/install.php +++ b/install.php @@ -267,7 +267,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting '#size' => 45, ); - // Database username + // Database password $form['basic_options']['password'] = array( '#type' => 'password', '#title' => st('Database password'), |