Looks like the file is just renamed, line 258 of app/controller/install.php
/**
* Write the config file details
*
* @return false If the file could not be renamed (e.g. written to)
*/
private function writeConfig() {
// Attempt to rename the config from blesta-new.php to blesta.php
if (!rename(CONFIGDIR . "blesta-new.php", CONFIGDIR . "blesta.php"))
return false;
// Generate a sufficiently large random value
Loader::load(VENDORDIR . "phpseclib" . DS . "Crypt" . DS . "Random.php");
$system_key = md5(crypt_random() . uniqid(php_uname('n'), true)) . md5(uniqid(php_uname('n'), true) . crypt_random());
$config = file_get_contents(CONFIGDIR . "blesta.php");
$replacements = array(
'{database_host}' => $this->db_info['host'],
'{database_name}' => $this->db_info['database'],
'{database_user}' => $this->db_info['user'],
'{database_password}' => $this->db_info['pass'],
'{system_key}' => $system_key
);
foreach ($replacements as &$value) {
$value = str_replace(array('\\', '$', '"'), array('\\\\', '\$', '\"'), $value);
}
file_put_contents(CONFIGDIR . "blesta.php", str_replace(array_keys($replacements), array_values($replacements), $config));
return true;
}
Looks like the installer could possibly be falling down while trying to set up the system key, even if it couldn't do the variable replacement it would still return true, perhaps need another error check in there; being able to rename the file doesn't automatically mean that it was written successfully.