We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42271
    • 21 Posts
    Hello World

    During a upgrade from 2.2.4 to 2.2.8 somtething went wrong. The config.inc.php ended up with empty placeholders. All i got was a white screen. Now i am trying to downgrade back to 2.2.4, but each time i try to run the installer i get a 500 error:

    "The website encountered an error while retrieving http://xxx.com/setup/index.php?action=options"

    I have rebuild the config.inc.php with corrects paths again, except for: "$site_sessionname = '{site_sessionname}';"

    Does anyone know where to find this in the database ?

    The site has been running fine on 2.2.4 so i guess it´s not a server config issue, so i have left the server config out here. [ed. note: optiki last edited this post 13 years, 2 months ago.]
      To every Problem there is ModX Solutions
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      I would advise you to attempt to repair or re-install 2.2.8: moving backwards is tricky at best, and it probably is a security risk.

      The site session name is a random string, I believe, which begins with "SN". Your sessions aren't critical when installing: you can flush them and users get logged out. You just need to get the install process to run normally and a value will be created for you. It's possible you jumped too many versions... maybe you needed to upgrade to 2.2.5 first or something. If the file didn't get written to, then it's possible you're experiencing permission errors.
        • 42271
        • 21 Posts
        Thanks Everett

        I´ve tried upgrading to 2.2.5 instead but no luck. All the file permissions are okay and in the config.inc.php i left the site_sessionname like this: $site_sessionname = '{site_sessionname}';

        The database and all the files are intact, but i cannot get the install/upgrade process up and running. When I click "next" i get the 500 error. I have no problem making a clean install of any of the modx versions.

        Maybe it´s possible to do a clean install and import the database and files ? I have moved several modx sites before to a new location but that process won´t work here, because it wil just move the problem to a new location.

        I would be very greatfull if anyone could point me in the direction of a solution.
          To every Problem there is ModX Solutions
          • 42271
          • 21 Posts
          I am working for a small client and I am only allowed to have 1 database, which means we have and old evo site and a new revo site running the same database, but with different prefix. If I only could create a new database I could solve the problem with a clean install. Importing the old database into the new one and run setup.

          So i am kindof stuck here. I cannot afford the 300$ support for this client, but if anyone is up for looking into this, i could pay a fee.
          So ping me with a price ;-D
            To every Problem there is ModX Solutions
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Can't you export the old database with some code to only dump the tables with the given prefix? http://stackoverflow.com/questions/2949330/mysqldump-more-than-one-table
              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
              • 42271
              • 21 Posts
              Quote from: sottwell at Aug 05, 2013, 10:57 AM
              Can't you export the old database with some code to only dump the tables with the given prefix? http://stackoverflow.com/questions/2949330/mysqldump-more-than-one-table

              Seems like a good idea, but i am not really an expert on mysql. Let´s say i have to prefixes: old_ and new_. Maybe i could export old_ and then import it to new_, Then copy the assets folder to the new installation and run setup again. But again, i don´t now how to import the old_ tables into new_
                To every Problem there is ModX Solutions
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                When you export the old_ tables, you'll have a text file. Simply open it in a text editor and do a search-and-replace for replacing all instances of old_ with new_, then use the modified .sql file for the import.
                  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
                  • 42271
                  • 21 Posts
                  Quote from: sottwell at Aug 05, 2013, 01:03 PM
                  When you export the old_ tables, you'll have a text file. Simply open it in a text editor and do a search-and-replace for replacing all instances of old_ with new_, then use the modified .sql file for the import.

                  Thanks Sottwell. Will try that one. Got a clean 2.2.8 up and running.

                  I am still curious about what went wrong and why a cannot upgrade the my revo site. To summarize - these things went well or are ok.

                  - file permissions are ok
                  - config.inc.php paths are ok

                  In a new prefix in the database i did a:

                  - clean install of 2.2.4 and it went fine
                  - upgrade of 2.2.4 to 2.2.8 and it went fine

                  But something is wrong with the revo site. I tried reuploading 2.2.4 and 2.2.5 but as soon as i hit the next button in the upgrade process i get the 500 error.

                  My goal is not to tamper to much with the sql file , because the old evo site is running there and is public.
                  If i did a find and replace, i would end up with duplicates. If i replace _new with _old i would have a database with 2 times the prefix old_ and then i would have to figure out to delete the duplicates.

                  So i guess my question is: Where else can i look for something wrong, to get the setup/upgrade process up and running ? What could make it stop right after I hit the next button:

                  "The website encountered an error while retrieving http://mydomain/setup/index.php?action=options. It may be down for maintenance or configured incorrectly."
                    To every Problem there is ModX Solutions
                    • 42271
                    • 21 Posts
                    Might have found a solution:

                    1. make a copy of config.inc.php and leave the config.inc.php empty then I can run a new installation ( no 500 error )
                    Of course that will overide my database, but i´ve got a backup.

                    2. Then import the backup sql via PhpMyAdmin

                    3. Run setup / upgrade

                    Could that be a solution ?



                      To every Problem there is ModX Solutions