diff --git a/web/install/bdd.php b/web/install/bdd.php index 5e46fe440..8e9561876 100644 --- a/web/install/bdd.php +++ b/web/install/bdd.php @@ -32,7 +32,8 @@ if (isset($_POST['host']) && isset($_POST['username']) && isset($_POST['passwor $_SESSION['install']['port'] = $_POST['port']; $checkConnection = new \Thelia\Install\CheckDatabaseConnection($_POST['host'], $_POST['username'], $_POST['password'], $_POST['port']); - if(! $checkConnection->exec() || $checkConnection->getConnection()->query('show databases') === false){ + $databases = $checkConnection->getConnection()->query('SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA'); + if(! $checkConnection->exec() || $databases === false){ header('location: connection.php?err=1'); exit; } @@ -48,7 +49,6 @@ else { $_SESSION['install']['step'] = 4; $connection = $checkConnection->getConnection(); -$databases = $connection->query('show databases'); ?>