install_verify_database_settings($site_path)
Verifies that settings.php specifies a valid database connection.
Parameters
string $site_path: The site path.
Return value
bool TRUE if there are no database errors.
File
- core/includes/install.core.inc, line 1097
- API functions for installing Drupal.
Code
function install_verify_database_settings($site_path) { if ($database = Database::getConnectionInfo()) { $database = $database['default']; $settings_file = './' . $site_path . '/settings.php'; $errors = install_database_errors($database, $settings_file); if (empty($errors)) { return TRUE; } } return FALSE; }
Please login to continue.