1.3.8.5 /install redirects me to ../ which redirects me to /site/offline

Ernesto

Member
Hi, I upgraded to 1.3.8.5, wiped the DB clean and wanted to install it from scratch, but /install redirects to ../ and from there it redirects to /site/offline
What can be the problem here?

Edit:
I saw the redirect was made at line 42 of the install script:
PHP:
if (!isset($_SESSION['config_file_created']) && is_file(MW_MAIN_CONFIG_FILE)) {
    header('location: ../');
    exit;
}
Ok, so I removed custom-main.php so the install script can create it.
But now I get
Unable to write the configuration file!
even when the config directory and the main.php file have write permissions for everyone.
 
Last edited:
even when the config directory and the main.php file have write permissions for everyone.
This is given at /install/controllers/DatabaseController.php line 102 and the code tries to write in the apps/common/config directory which is not writeable. If it was, then PHP could have written it.
For clarity, here's the code that fails:
Code:
$contents = str_replace(array_keys($searchReplace), array_values($searchReplace), $contents);
if (!@file_put_contents(MW_MAIN_CONFIG_FILE, $contents)) {
    return $this->addError('general', 'Unable to write the configuration file!');
}
So there's nothing special to it, just PHP not being able to write in that file.
 
Ok I just gave the permissions and the install finally worked.
I just found it strange that the install created the configuration file, but then it wasn't able to write to it.
 
Back
Top