We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 54497
    • 15 Posts
    UPDATE.... I moved core back to be under my web root.
    Updated all the paths... The manager and website works fine !!!! No issues.

    When I move it outside the document root.... change the paths it breaks the INCLUDES.
      • 54497
      • 15 Posts
      Folks,
      I think I have this resolved.

      OLD: define('MODX_CORE_PATH', dirname(__FILE__) . '/var/www/sites/blah.com/core/');
      NEW: define('MODX_CORE_PATH', '/var/www/sites/blah.com/core/');

      Like I had advised the system was appending my full path of my core to the webroot.
      When I remove the dirname(__FILE__) or dirname(__DIR__) it doesn't append it. Setting my core path to just the path set in the second variable(Only variable in the define).

      The manager page does load now.
        • 46886
        • 1,154 Posts
        Right right that should be the difference between relative and absolute paths.

        Quote from: mferry at Aug 17, 2018, 04:57 PM
        Folks,
        Like I had advised the system was appending my full path of my core to the webroot.
        When I remove the dirname(__FILE__) or dirname(__DIR__) it doesn't append it. Setting my core path to just the path set in the second variable(Only variable in the define).

        Now make sure you have the right code in the template <head>, not sure if you have this stuff handy or not
        <html lang="[[++cultureKey]]" class="no-js">
        <head>
        <title>[[*pagetitle]] | [[++site_name]]</title>
        <base href="[[!++site_url]]" />
        <meta name="rating" content="" >
        <meta name="author" content="">
        <meta name="keywords" content="" />
        <meta name="description" content="[[*description]]" />
        <meta name="robots" content="index, follow">
        
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        
        <meta http-equiv="X-UA-Compatible" content="IE=edge">

          • 54497
          • 15 Posts
          As far as I can tell... The manager is working fine, but...
          when you access the main page. http://blah.com

          Error 503

          Site temporarily unavailable

          nothing is getting in to the log file.
          Is there a cache I need to delete?
            • 46886
            • 1,154 Posts
            yes, in core/cache
            • discuss.answer
              • 3749
              • 24,544 Posts
              With the moved core, you want exactly this in the first line of the config.core.php files (as you have above) and it should also be the first thing in config.inc.php:

              define('MODX_CORE_PATH', '/var/www/sites/blah.com/core/');


              You need it there, even though it's defined in config.core.php because sometimes a script might go directly to the config.inc.php file.

              MODX uses the config.core.php files just to find the config.inc.php file. Once it finds config.inc.php, it gets all the other locations from there.

              Remember that when you move the core, you also move the connectors and processors directories because they're under the core. So these would make sense with your moved core:

              define('MODX_CONNECTORS_PATH', '/var/www/sites/blah.com/core/connectors/');
              define('MODX_PROCESSORS_PATH', '/var/www/sites/blah.com/core/model/modx/processors/');



              Setup tends to daisy chain the settings like this:
              define('MODX_CONNECTORS_PATH', $corePath .  'connectors/');


              But on some servers, you need to hard code each path on its own.



                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
                • 46886
                • 1,154 Posts
                That's pretty clear Bob, thanks for laying it out so nicely

                MODX uses the config.core.php files just to find the config.inc.php file. Once it finds config.inc.php, it gets all the other locations from there.

                And thusly, wine was invented. Or the need for wine, which is almost the same thing