. */ /* */ /*************************************************************************************/ $step=4; include("header.php"); if (isset($_POST['host']) && isset($_POST['username']) && isset($_POST['password']) && isset($_POST['port'])){ $_SESSION['install']['host'] = $_POST['host']; $_SESSION['install']['username'] = $_POST['username']; $_SESSION['install']['password'] = $_POST['password']; $_SESSION['install']['port'] = $_POST['port']; $checkConnection = new \Thelia\Install\CheckDatabaseConnection($_POST['host'], $_POST['username'], $_POST['password'], $_POST['port']); if(!$checkConnection->exec()) { header('location: connection.php?err=1'); exit; } $databases = $checkConnection->getConnection()->query('SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA'); if(false === $databases){ header('location: connection.php?err=1'); exit; } } elseif($_SESSION['install']['step'] >=3) { $checkConnection = new \Thelia\Install\CheckDatabaseConnection($_SESSION['install']['host'], $_SESSION['install']['username'], $_SESSION['install']['password'], $_SESSION['install']['port']); } else { header('location: connection.php?err=1'); exit; } $_SESSION['install']['step'] = 4; $connection = $checkConnection->getConnection(); ?>