Lines Matching +full:ini +full:- +full:file

115         $this->user_service         = $user_service;
116 $this->migration_service = $migration_service;
117 $this->module_service = $module_service;
118 $this->server_check_service = $server_check_service;
122 * Installation wizard - check user input and proceed to the next step.
130 $this->layout = 'layouts/setup';
136 $ip_address = Validator::serverParams($request)->string('REMOTE_ADDR', '127.0.0.1');
137 $request = $request->withAttribute('client-ip', $ip_address);
139 Registry::container()->set(ServerRequestInterface::class, $request);
141 $data = $this->userData($request);
143 $step = Validator::parsedBody($request)->integer('step', 1);
145 $locales = $this->module_service
146 ->setupLanguages()
147->map(static fn (ModuleLanguageInterface $module): LocaleInterface => $module->locale());
152 … $locale = Locale::httpAcceptLanguage($request->getServerParams(), $locales->all(), $default);
154 $data['lang'] = $locale->languageTag();
159 $data['cpu_limit'] = $this->maxExecutionTime();
161 $data['memory_limit'] = $this->memoryLimit();
165 $data['errors'] = $this->server_check_service->serverErrors($data['dbtype']);
166 $data['warnings'] = $this->server_check_service->serverWarnings($data['dbtype']);
168 $data['errors'] = $this->server_check_service->serverErrors();
169 $data['warnings'] = $this->server_check_service->serverWarnings();
172 if (!$this->checkFolderIsWritable(Webtrees::DATA_DIR)) {
173 $data['errors']->push(
183 return $this->step1Language($data);
185 return $this->step2CheckServer($data);
187 return $this->step3DatabaseType($data);
189 return $this->step4DatabaseConnection($data);
191 return $this->step5Administrator($data);
193 return $this->step6Install($data);
207 $data[$key] = Validator::parsedBody($request)->string($key, $default);
234 switch (substr($memory_limit, -1)) {
278 return $this->viewResponse('setup/step-1-language', $data);
288 return $this->viewResponse('setup/step-2-server-checks', $data);
298 if ($data['errors']->isNotEmpty()) {
299 return $this->viewResponse('setup/step-2-server-checks', $data);
302 return $this->viewResponse('setup/step-3-database-type', $data);
312 if ($data['errors']->isNotEmpty()) {
313 return $this->step3DatabaseType($data);
316 return $this->viewResponse('setup/step-4-database-' . $data['dbtype'], $data);
330 $this->connectToDatabase($data);
332 $data['errors']->push($ex->getMessage());
335 return $this->viewResponse('setup/step-4-database-' . $data['dbtype'], $data);
338 return $this->viewResponse('setup/step-5-administrator', $data);
348 …$error = $this->checkAdminUser($data['wtname'], $data['wtuser'], $data['wtpass'], $data['wtemail']…
351 $data['errors']->push($error);
353 return $this->step5Administrator($data);
357 $this->createConfigFile($data);
359 return $this->viewResponse('setup/step-6-failed', ['exception' => $exception]);
362 // Done - start using webtrees!
395 $this->connectToDatabase($data);
396 …$this->migration_service->updateSchema('\Fisharebest\Webtrees\Schema', 'WT_SCHEMA_VERSION', Webtre…
399 $this->migration_service->seedDatabase();
401 // If we are re-installing, then this user may already exist.
402 $admin = $this->user_service->findByIdentifier($data['wtemail']);
404 $admin = $this->user_service->findByIdentifier($data['wtuser']);
408 …$admin = $this->user_service->create($data['wtuser'], $data['wtname'], $data['wtemail'], $data['wt…
409 $admin->setPreference(UserInterface::PREF_LANGUAGE, $data['lang']);
410 $admin->setPreference(UserInterface::PREF_IS_VISIBLE_ONLINE, '1');
412 $admin->setPassword($_POST['wtpass']);
415 $admin->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
416 $admin->setPreference(UserInterface::PREF_IS_EMAIL_VERIFIED, '1');
417 $admin->setPreference(UserInterface::PREF_IS_ACCOUNT_APPROVED, '1');
419 // Write the config file. We already checked that this would work.
420 $config_ini_php = view('setup/config.ini', $data);
425 $request = Registry::container()->get(ServerRequestInterface::class)
426 ->withAttribute('base_url', $data['baseurl']);