private function create_phpboost_tables() { AppContext::get_cache_service()->clear_cache(); try { $this->installation->create_phpboost_tables(DBFactory::MYSQL, $this->db_host, $this->db_port, $this->db_schema, $this->db_user, $this->db_password, $this->db_tables_prefix); return true; } catch (UnexistingDatabaseException $exception) { CLIOutput::writeln('Database ' . $this->db_schema . ' does not exist and attempt to create it failed. Create it and relaunch the installation'); } catch (DBConnectionException $exception) { CLIOutput::writeln('Connection to database failed, check your connection parameters'); } catch (IOException $exception) { CLIOutput::writeln('Can\'t write database configuration file informations to /kernel/db/config.php. ' . 'Check file or parent directory permissions.'); } return false; }
private function create_tables(InstallationServices $service, $host, $port, $login, $password, $schema, $tables_prefix) { if (!$service->is_already_installed() || !$this->overwrite_field->is_disabled() && $this->overwrite_field->is_checked()) { PersistenceContext::close_db_connection(); $service->create_phpboost_tables(DBFactory::MYSQL, $host, $port, $schema, $login, $password, $tables_prefix); AppContext::get_response()->redirect(InstallUrlBuilder::website()); } else { $this->overwrite_fieldset->enable(); $this->error = $this->lang['phpboost.alreadyInstalled.explanation']; } }