We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53113
    • 13 Posts
    To harden MODX, I moved the core directory above public_html. I attempted to follow the directions here (which, frankly, lacked sufficient detail so it took a lot of trial and error. I've applied to be a Documents editor so I can make things easier for the next hapless noob.)

    The published document gives me this list of files to change:

    • core/config/config.inc.php (change the $modx_core_path variable)
    • /config.core.php (at the site root)
    • /connectors/config.core.php
    • /manager/config.core.php
    • The modx_workspaces database table

    but while the first had the full path laid out (and was therefore pretty clear), others had:
    define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');
    
    I have enough php coding experience to guess that "dirname(__FILE__) . " should probably be deleted so that the entire line of code reads:
    define('MODX_CORE_PATH', '/home/myusername/core/');
    At this point, I stopped getting 503 errors and actually got the Congratulations! page back. Still, the procedure wanted me to change the entry in the workspaces table of the database, so I went to phpMyAdmin, opened the database and navigated to the myprefix_workspaces table. By default, it read simply "{core_path}". I changed it to "/home/myusername/core/" - no quotes. Should I have wrapped it in single quotes? It doesn't seem to matter, I've tried it both ways and no matter what, when I try to access the ACP, I get
    The www.[mydomain].com page isn’t working

    www.[mydomain].com is currently unable to handle this request.
    HTTP ERROR 500
    I'll hasten to add that, yes, I did update core/config/config.inc.php to reflect my new manager directory.

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

      • 3749
      • 24,544 Posts
      I assume you mean ACP rather than APC.

      I think you can leave the workspaces table alone (i.e., leave it at {core_path} -- no quotes ). At one time, the path was hard-coded there, but now the {core_path} placeholder will be interpreted as the value in config.inc.php, which is much better in case the site or the core is moved.

      You should delete all files in the core/cache directory if you haven't already.

      Make sure you've uncommented one (but not both) of the sections in .htaccess that forces WWW or non-WWW URLs.

      You may also have to find a way to clear the APC cache without running APC. [ed. note: BobRay last edited this post 7 years, 3 months ago.]
        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
        • 53113
        • 13 Posts
        Quote from: BobRay at Jan 10, 2017, 08:16 PM
        I assume you mean ACP rather then APC.
        I meant ACP (Admin Control Panel) I can't access the Manager/can't do anything administrative.
          • 3749
          • 24,544 Posts
          Ah. The suggestions I made above are all still good (except for the last one).

          If none of that works, try visiting the site with your browser in incognito or private mode. If that solves it, you may need to clear your browser cache and cookies.

          You might also look at the MODX error log in the core/cache/logs/ 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
            • 53113
            • 13 Posts
            Thanks, Bob! I've done everything you suggested. I think I'm making progress because now I'm getting a big red box (with a darker red border) that says, "Site temporarily unavailable." That's the ONLY thing on the page. I saw this in the source code for one of the MODX files, so I guess I'm getting close but... still no joy. sad
            • discuss.answer
              • 53113
              • 13 Posts
              Finally got it. I had changed the database username and password but didn't change them in core/config/config.inc.php
                • 3749
                • 24,544 Posts
                That would do it. wink
                  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