* Checks the current installation environment. There are optional and mandatory checks.
*
* @param string $baseurl The baseurl of Friendica
- * @param string $phpath Optional path to the PHP binary
+ * @param string $phppath Optional path to the PHP binary
*
* @return bool if the check succeed
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public function checkEnvironment($baseurl, $phpath = null)
+ public function checkEnvironment($baseurl, $phppath = null)
{
$returnVal = true;
- if (isset($phpath)) {
- if (!$this->checkPHP($phpath)) {
+ if (isset($phppath)) {
+ if (!$this->checkPHP($phppath)) {
$returnVal = false;
}
}
{
$basepath = $configCache->get('system', 'basepath');
- $tpl = Renderer::getMarkupTemplate('local.config.tpl');
+ $tpl = Renderer::getMarkupTemplate('install/local.config.tpl');
$txt = Renderer::replaceMacros($tpl, [
- '$dbhost' => $configCache->get('database', 'hostname'),
- '$dbuser' => $configCache->get('database', 'username'),
- '$dbpass' => $configCache->get('database', 'password'),
- '$dbdata' => $configCache->get('database', 'database'),
-
- '$phpath' => $configCache->get('config', 'php_path'),
- '$adminmail' => $configCache->get('config', 'admin_email'),
- '$hostname' => $configCache->get('config', 'hostname'),
-
- '$urlpath' => $configCache->get('system', 'urlpath'),
- '$baseurl' => $configCache->get('system', 'url'),
- '$sslpolicy' => $configCache->get('system', 'ssl_policy'),
- '$basepath' => $basepath,
- '$timezone' => $configCache->get('system', 'default_timezone'),
- '$language' => $configCache->get('system', 'language'),
+ '$dbhost' => $configCache->get('database', 'hostname'),
+ '$dbuser' => $configCache->get('database', 'username'),
+ '$dbpass' => $configCache->get('database', 'password'),
+ '$dbdata' => $configCache->get('database', 'database'),
+
+ '$phppath' => $configCache->get('config', 'php_path'),
+ '$adminmail' => $configCache->get('config', 'admin_email'),
+
+ '$system_url' => $configCache->get('system', 'url'),
+ '$basepath' => $basepath,
+ '$timezone' => $configCache->get('system', 'default_timezone'),
+ '$language' => $configCache->get('system', 'language'),
]);
$result = file_put_contents($basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.config.php', $txt);
* TLS Check
*
* Tries to determine whether the connection to the server is secured
- * by TLS or not. If not the user will be warned that it is higly
- * encuraged to use TLS.
+ * by TLS or not. If not the user will be warned that it is highly
+ * encouraged to use TLS.
*
* @return bool (true) as TLS is not mandatory
*/