We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42517
    • 9 Posts
    I've been struggling with this for days now, but this is as far as I've gotten.
    I've been working from this tutorial: http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server
    I'm almost certain I've done this properly:

    ****config.inc.php****

    if (!defined('MODX_CORE_PATH')) {
    $modx_core_path= '/content/Hosting/p/e/myDomain.ie/web/core/';
    define('MODX_CORE_PATH', $modx_core_path);
    }
    if (!defined('MODX_PROCESSORS_PATH')) {
    $modx_processors_path= '/content/Hosting/p/e/myDomain.ie/web/core/model/modx/processors/';
    define('MODX_PROCESSORS_PATH', $modx_processors_path);
    }
    if (!defined('MODX_CONNECTORS_PATH')) {
    $modx_connectors_path= '/content/Hosting/p/e/myDomain.ie/web/connectors/';
    $modx_connectors_url= '/connectors/';
    define('MODX_CONNECTORS_PATH', $modx_connectors_path);
    define('MODX_CONNECTORS_URL', $modx_connectors_url);
    }
    if (!defined('MODX_MANAGER_PATH')) {
    $modx_manager_path= '/content/Hosting/p/e/myDomain.ie/web/manager/';
    $modx_manager_url= '/manager/';
    define('MODX_MANAGER_PATH', $modx_manager_path);
    define('MODX_MANAGER_URL', $modx_manager_url);
    }
    if (!defined('MODX_BASE_PATH')) {
    $modx_base_path= '/content/Hosting/p/e/myDomain.ie/web/';
    $modx_base_url= '/';
    define('MODX_BASE_PATH', $modx_base_path);
    define('MODX_BASE_URL', $modx_base_url);
    }

    ......

    if (!defined('MODX_ASSETS_PATH')) {
    $modx_assets_path= '/content/Hosting/p/e/myDomain.ie/web/assets/';
    $modx_assets_url= '/assets/';
    define('MODX_ASSETS_PATH', $modx_assets_path);
    define('MODX_ASSETS_URL', $modx_assets_url);
    }


    *****config.core.php*****
    *****This is the same for all three config.core.php files*****

    <?php
    define('MODX_CORE_PATH', '/content/Hosting/p/e/peopleandculture.ie/web/core/');
    define('MODX_CONFIG_KEY', 'config');
    ?>


    My error log shows these errors:

    PHP Warning: include_once(/content/Hosting/p/e/myDomain.ie/web/core/model/modx/modx.class.php): failed to open stream: No such file or directory in /content/sites/p/e/myDomain.ie/web/manager/index.php on line 50

    PHP Warning: include_once(): Failed opening '/content/Hosting/p/e/myDomain.ie/web/core/model/modx/modx.class.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /content/sites/p/e/myDomain.ie/web/manager/index.php on line 50

    PHP Warning: include(/content/Hosting/p/e/myDomain.ie/web/core/error/unavailable.include.php): failed to open stream: No such file or directory in /content/sites/p/e/myDomain.ie/web/manager/index.php on line 51

    PHP Warning: include(): Failed opening '/content/Hosting/p/e/myDomain.ie/web/core/error/unavailable.include.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /content/sites/p/e/myDomain.ie/web/manager/index.php on line 51


    I'm having the exact same problem as OP. The files are uploaded to the server, database is imported and it's path is set, .htaccess is in order. The site shows up fine on the browser, but if I go to manager I get "site temporarily unavailable".

    This is the code that seems to be failing.

    /* include the modX class */
    if (!(include_once MODX_CORE_PATH . 'model/modx/modx.class.php')) {
    include MODX_CORE_PATH . 'error/unavailable.include.php';
    die('Site temporarily unavailable!');
    }

    If anyone has any suggestions please don't hesitate. I'm at my wits end with this.

    Thanks
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      I think you may have some typos in your configs. Use this script: https://github.com/craftsmancoding/modx_utils/blob/master/test_config.php

      Upload it to your MODX root and then hit it in a browser. It should tell you whether you've missed anything and where.
        • 42517
        • 9 Posts
        Thank you for that. Though it doesn't really help me as it tells me what the error log does, more or less, but in a nicer way. It's saying a file isn't there where as far as I can tell, it is there. Unless I'm missing something, which is very possible as I'm a bit of a Luddite at this stage. Could it be something to do with the uppercase H in /content/Hosting/p/e/mydomain.ie/web/ and Linux being case-sensitive? It's on Linux servers.
        Anyway, thanks again for the link. Definitely holding on to that for future use.
          • 9207 ☆ A M B ☆
          • 2,475 Posts
          I think you're missing something. If it says the file isn't there, then you'd better triple-check your configuration details. "File not found" is another way of saying "Your configuration file(s) are pointing to the wrong folder."
            • 36996
            • 211 Posts
            What about this part:
            if (!defined('MODX_HTTP_HOST')) {
                if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
                    $http_host='myDomain.ie';
                    define('MODX_HTTP_HOST', $http_host);
                } else {
                    $http_host= $_SERVER['HTTP_HOST'];
                    if ($_SERVER['SERVER_PORT'] != 80) {
                        $http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
                    }
                    $http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
                    define('MODX_HTTP_HOST', $http_host);
                }
            }
            


            It's easy to miss