SIlverstripe 4.3.2 redirecting to installation page

silverstripe-4
Tags: #<Tag:0x00007f10c9783b70>

#1

Silverstripe Version: 4.3.2

Question:

I have encounter an issue after deploying the latest update to my code. SilverStripe framework and a few others modules has also updated since I have not deploy in a while (dependencies through composer). However, the site now redirects to installation page with text saying:

" Note: SilverStripe is already installed here."
If you choose to reinstall SilverStripe, your current settings will be replaced

I have double check my .env file and everything is correct with all the database details. I have never had an issue before with deploying until this time where a few dependencies were updated and now only the installation page comes up. I am in frustration to why this has happened and looking for potential reasons and ways to solve this issue. I’m just not sure where to start to stop the site from going to installation page.

Any suggestions and help are appreciated

thanks !

Tony

// Include any relevant code. If you have a lot of code, link to a gist instead.

#2

What was the version of SilverStripe before you updated to the latest version?


#3

It was a version 4.2


#4

I wonder at what point you’re getting sent to Installer. Maybe try editing this method to check that your database config is getting loaded correctly. Something like:

    protected function validateDatabase()
    {
        $databaseConfig = DB::getConfig();
        // Gracefully fail if no DB is configured
        if (empty($databaseConfig['database'])) {
            echo "No DB details :(";exit; // <-- temporary debugging hack
            $this->detectLegacyEnvironment();
            $this->redirectToInstaller();
        }
    }

I’m sure there’s a more elegant way to debug this but that’s what I’d try :smile: