We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50264
    • 15 Posts
    Hi,

    I'm trying to run an advanced upgrade across 2.3.3 installation (I also need to change the DB config, hence the 'advanced').

    All is well, until I enter the Database credentials and then it all goes wrong:


    • The 'Test' ajax call doesn't do anything.

    Upon clicking the 'Test' link it does nothing. Some googling shows that this is a 'popular' problem from a few years back, so after much digging I managed to get some errors to show (instead of nothing) by hitting enter while in a form field it submits the form - at this point it I get a connection refused, but if I then hit back and click 'test' again - I was getting a character/collation error.

    So, off I go and come across some crazy issues from years ago with which the solution was to append 'utf8' onto the ->config['dsn'] property in xpdo.class.php. This actually worked and I finally got connected.


    So now presented with the 'character/collation' form, I hit 'Create or test selection' and now get the several errors (depending on god knows what):


    1. That prefix already exists (even though I selected 'advanced', when I hit back in my browser the 'upgrade' radio is elected not the 'advanced')
    2. Or the latest...Unable to create database, please create manually.

    I've double-checked and confirm that my default database char/coll is utf8/general.

    I'm going mad here, so if anybody has any idea what I can try next - help is greatly appreciated.

    Matt

    This question has been answered by mattkirwan. See the first response.

      • 3749
      • 24,544 Posts
      It may not be your main problem, but check to make sure that the character set and collation of all tables and text fields are also utf8. SiteCheck will check them all for you (and a lot of other stuff), but you can do it yourself on the Structure tab in PhpMyAdmin.

      If there is a mismatch, see this page. Just changing the setting in the DB is usually not a safe solution.
        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
        • 50264
        • 15 Posts
        Quote from: BobRay at Apr 14, 2015, 02:11 PM
        If there is a mismatch, see this page. Just changing the setting in the DB is usually not a safe solution.

        Hi BobRay,

        Thanks for your response. I just checked my .sql dump and sure enough it's full of latin1's. Another angle for me to attack.

        Cheers.

        Matt
          • 50264
          • 15 Posts
          Unfortunately after another day of messing around I'm (on the face of it) no further forward.

          I've gotten the database up to speed with the char/coll and after using BobRay's sitechecker it's reporting that all is well.

          I'm still getting nothing upon clicking 'Test Database' and if I try to bypass that by hitting enter to submit the form and bypass the hidden next button it's still just throwing me a 'Connection Reset' Browser error.

          I've redployed the code and wiped cache/setup dirs everytime (I don't like how the setup is cached, I can't see it's purpose).

          Are there anymore ideas out there??? anyone!?!...
            • 22840
            • 1,572 Posts
            How did you install 2.3.3 ( traditional or advanced ) ? as I'm not sure you can run an advanced upgrade if it wasn't installed as advanced but I might be wrong
              • 22840
              • 1,572 Posts
              My bad looks like you can, have you followed this tutorial of how to do the upgrade

              http://www.sepiariver.ca/blog/modx-web/benefits-of-the-modx-advanced-installation/
                • 50264
                • 15 Posts
                Hi Paul,

                Thanks for the response. Not that specific article but I've ran through each setup step many times now (manually changing all params eg: confs/db etc...).

                I just can't work out as to why on submission of the 'test database settings' ajax call I'm getting a 'Connection Refused'.

                I've double-checked the mods/install requirements, disabled opcache, updated any packages...short of stepping through the code to find out where/why the instantiation of modx is failing I'm at a loose end.

                Nothing appears in the apache and php logs and as far as I can tell it's not possible to get modx logging until the instance is up and that's what is (Seemingly) failing.

                  • 50264
                  • 15 Posts
                  Still digging away and the problem seems eerily similar to this: https://github.com/modxcms/revolution/pull/11202

                  I've checked my setup and confirmed that I am indeed using that commit.

                  I've checked and rechecked that opcache is disabled in both phpinfo() and opcache_get_status(). It is disabled. I've also called opcache_reset() just to be sure.

                  Here is my process for rerunning the setup:


                  • Deploy latest code (this is a git repo with all packages in etc...). Core is outside public root.
                  • Pipe in the latest database .sql (All tables/columns/defaults are confirmed as utf8/general)
                  • The database import has no stray sessions
                  • Update core/config/core.config.php (it's not called this) with new DB settings, paths and hosts.
                  • Update web/connectors/core.config.php with new values
                  • Update web/manager/core.config.php with new values
                  • Update web/core.config.php with new values
                  • the core dir has been moved up one level from public AND renamed
                  • the connector and manager dirs are also obfuscated
                  • cp -R 2.3.3 setup to public root
                  • cp -R 2.3.3 core to the core_456 directory (this merge shouldn't do anything because the current version IS ALSO 2.3.3 - but why not!
                  • Fix permission on setup
                  • Create/fix permissions on cache/import and export dirs in core_456
                  • rm -rf cache/*

                  I've also tested the PDO connection many times (using a manual script).

                  So the problem I am having:


                  • ModX Setup - Core Finder -> Works fine.
                  • ModX Setup - Lang Selector -> Works fine.
                  • ModX Setup - Install Type - If I select 'Upgrade' -> 'Connection Refused' - apache flips it shit for that request but is still running.
                  • ModX Setup - Install Type - If I select "advanced Upgrade/Install' - works fine.
                  • ModX Setup - Advanced - Click 'Test' (I absolutely know the settings are correct) - nothing - but firebug on the AJAX request implies 'connection refused' (I'm not certain though because there is nor esponse)
                  • ModX Setup - Advanced - Try and 'cheat' the system by hitting enter while in the database connection details form, this submits a POST to ?action=database - this has worked in the past -> Connection refused.

                  You can probably guess that I am stumped...

                  ...anythin helps!














                    • 3749
                    • 24,544 Posts
                    Is your config directory called config? IIRC, you can rename the config.inc.php file, but not the 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
                      • 50264
                      • 15 Posts
                      Hi BobRay,

                      Yes. The current config setup is as follows:


                      • /var/www/domain.com/core_ty67/config/RanD0mK3y.inc.php