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

    I've been developing a website on my machine locally and everything went great. Now the time has come to move it and make it accessible to the whole world!
    But that's where I'm stuck. I've followed a guide (http://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server) step by step but unfortunately to no avail.

    I've noticed that some things are different in the guide than they are for me. For example, the guide mentions to update the config.core.php files:
    There are also 3 additional configuration files that contain two PHP constants:
    define('MODX_CORE_PATH', '/path/to/modx_doc_root/core/');
    define('MODX_CONFIG_KEY', 'config');

    But when I open up these files they say something different:
    define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');
    define('MODX_CONFIG_KEY', 'config');
    


    Also when updating the workspaces in the database the guide makes it look like there should be a relative path to the core folder, except when I open it up it says "{core_path}".

    I did update the config file in the core folder (and to my knowledge I did that correctly), but when I go to the manager it says:
     Fatal error: Call to a member function getMessage() on a non-object in /home/sandeyv85/domains/sdekroon.nl/public_html/core/model/modx/modmanagercontroller.class.php on line 618


    And when I try to re-run the setup it's giving me three errors:
     Checking if /domains/sdekroon.nl/public_html/ directory exists: Failed!
    Checking if /domains/sdekroon.nl/public_html/manager/ directory exists: Failed!
    Checking if /domains/sdekroon.nl/public_html/connectors/ directory exists: Failed!


    Does anybody know what I've done wrong?

    Details:

    • PHP 5.3.27
    • MySQL 5.5.34
    • ModX 2.3
      • 47401
      • 295 Posts
      Hi

      Did you change the configuration setting in modx manager site_url? this config value needs to be changed before you go ahead and move the site.

      also have you checked the .htaccess file for any paths relating to the unc path to the website i.e you may find something like c:\wamp\htdocs\website\ rather than the path in the new hosting environment i.e /var/www/domain/

      also clear all the contents out of the core/cache folder and delete all your local browser cache. [ed. note: comp_nerd26 last edited this post 11 years, 11 months ago.]
        • 46557
        • 6 Posts
        Hi

        I've disabled the .htaccess file by renaming it to ht.access. Also, I checked it and it doesn't make any reference to the old environment. And yes, I did clear the cache folder.

        But I'm not sure how to change this site_url config value as I can't login to the manager. Can I look this up in the database perhaps?
          • 47401
          • 295 Posts
          have you tried re running the setup with the upgrade option?

          also check that the folder permissions are 0775 reoccursive for the following folders:

          core/cache/
          core/export
          core/packages
          core/components
          /core/config/config.inc.php (file)
          assets
          setup (if the folder exists)
            • 24374
            • 322 Posts
            Why 0775 instead of 0755?
              • 46557
              • 6 Posts
              I've tried to run the upgrade option, but then it's giving me errors on not being able to find certain folders, even though they're there.

              Of course those folder are writeable and accessible by the server (I've triend 755 and 777). What's even more strange is that it can't find the public_html folder, but can find core/cache folders.
                • 22840
                • 1,572 Posts
                The paths for those 3 are wrong by the looks of it, shouldn't it be /home/sandyv85/.....

                Check the paths in the core >> config >> config.inc.php [ed. note: paulp last edited this post 11 years, 11 months ago.]
                  • 46557
                  • 6 Posts
                  Thanks for your reply.

                  I've tried that, but then I end up with this error message:

                  Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/sandeyv85/domains/sdekroon.nl/public_html/core/xpdo/xpdo.class.php on line 340
                  
                  Fatal error: Class 'xPDODriver_' not found in /home/sandeyv85/domains/sdekroon.nl/public_html/core/xpdo/xpdo.class.php on line 1867


                  I've changed the paths from:
                  /domains/sdekroon.nl/public_html/core/
                  to:
                  /home/sandeyv85/domains/sdekroon.nl/public_html/core/
                  Which results in the error message above.
                  (This is an example, I did change the other paths too)
                    • 47401
                    • 295 Posts
                    it looks like that one of the config files is still pointing to the old location.

                    found an article that might help you
                    http://wiki.modxcms.com/index.php/Moving_Site_To_Another_Location

                    was the setup folder copied from the local environment to the live environment, if yes then that will cause an issue. delete the setup folder from the live environment and copy across the setup folder to the live environment from a new downloaded copy (using the same version of modx your running) [ed. note: comp_nerd26 last edited this post 11 years, 11 months ago.]
                      • 3749
                      • 24,544 Posts
                      The odds are really good that one or more paths or URLs is still incorrect in core/config/config.inc.php. Search it for 'sdekroon'. That shouldn't be there.

                      Also, make sure the paths there all end with a slash.

                      site_url, BTW, is not there. It's created dynamically based on the URL the user comes in on.
                        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