We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42241
    • 25 Posts
    I decided to upgrade from 2.3.2 to 2.3.5, and it has been a disaster. I now get a 503 for my site, and when I try to run setup, I don't have the option to upgrade, only new install. Of course, I don't want to overwrite my database, so following the setup, I test database server connection - fine, but test selection of database gives me Checking database: Table prefix is already in use in this database!

    So what do I do?

    Grateful for any help.

    John
      Revo 2.3.3
    • Did you do a backup of the site before you upgraded?

      What kind of installation do you have? Is it a standard installation, or is the core moved or any of the root directories such as /manager/ renamed?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3749
        • 24,544 Posts
        The first thing to try is manually deleting all files in the core/cache directory and clearing your browser cache and cookies (or using incognito or private mode in the browser).

        The only thing I can think of that would cause that is a bad config.core.php file, especially the one in the setup directory. That tells MODX where the core is.

        There are four of them:

        MODX root
        manager directory
        connectors directory
        setup directory

        MODX assumes it's a new install if it can't find the core/config/config.inc.php file (or if it's empty). Your situation is odd because it obviously finds that file at some point to get the table prefix, yet it doesn't want to do an upgrade install.

        The problem is almost certainly in one of the four config.core.php files, the config.inc.php file, or the .htaccess file in the MODX root.

        It's also possible (though I don't think it's likely) that you have a plugin that's not compatible with the new version of MODX. You can disable all plugins in the modx_site_plugins table, then delete all files in the core/cache directory.

          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • The error about the table prefix is because he is trying to run a "new" install and specifying the same prefix, probably the default. It is possible that in the process of overwriting the old files with the new the actual "core" folder itself was overwritten, thus there is no config.inc.php file. Without being able to see just what is in that core directory (i.e. are the core/components and core/packages that should be there, there or not) it's hard to tell just what happened.

          It could also be that this is an attempt to use the standard installation to upgrade an advanced installation, where the core directory was moved. In that case again it would be trying to install with the new "core" directory in the standard location, and again no config.inc.php file. That's why with the advanced setup it is first necessary to move the core files to the actual core location, then tell the setup where it is.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 3749
            • 24,544 Posts
            Setup should really be smarter than this. It can easily detect that the core has been moved (and or the other directories renamed). Unless it already does, and the config.core.php files were overwritten.

            It seems to me that the config.core.php files should be initially placed somewhere else and moved into place at the beginning of setup without overwriting existing ones. Maybe I'm missing something.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting