We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37258
    • 34 Posts
    I'm trying to launch a site developed on my own server, I've done lots of moving ModX installations before but this one is proving to be extremely problematic.

    http://preview4.reg365.net/~dlslegal.ie/

    As you can see the site is loading actual text content but any snippets are being ignored, the manager directory returns a blank page as does the setup directory. My core.inc.php appears to be configured correctly according to the test_config.php script and I've made sure to update the other files in manager, connectors & the root directory.

    Could I be experiencing issues because I'm trying to access the site via a staging URL?

    Does/Has anyone had experience of using ModX with this host?

    Really hope someone can help because I've been banging my head against a wall all morning!
      • 3109 ☆ A M B ☆
      • 894 Posts
      When navigating to the manager or setup directory it is redirecting to http://preview4.reg365.net/manager instead of http://preview4.reg365.net/~dlslegal.ie/manager so I would say something in your settings or db that wasn't updated correctly.

      So review all your config files and make sure you follow the steps outlined here.

      Good luck.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 37258
        • 34 Posts
        Hi Ben,

        I noticed that as well, you need to add a trailing slash after the URL so http://preview4.reg365.net/~dlslegal.ie/manager should be http://preview4.reg365.net/~dlslegal.ie/manager/, then it returns the blank page without redirecting.

        Don't think its the DB config as content is being returned, however content generated by snippets isn't, notice theres no navigation or login form on the homepage. Theres also a slideshow thats not appearing.

        This is a dump of my config.inc.php

        if (!defined('MODX_CORE_PATH')) {
            $modx_core_path= '/var/www/web/core/';
            define('MODX_CORE_PATH', $modx_core_path);
        }
        if (!defined('MODX_PROCESSORS_PATH')) {
            $modx_processors_path= '/var/www/web/core/model/modx/processors/';
            define('MODX_PROCESSORS_PATH', $modx_processors_path);
        }
        if (!defined('MODX_CONNECTORS_PATH')) {
            $modx_connectors_path= '/var/www/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= '/var/www/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= '/var/www/web/';
            $modx_base_url= '/';
            define('MODX_BASE_PATH', $modx_base_path);
            define('MODX_BASE_URL', $modx_base_url);
        }
        if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
            $isSecureRequest = false;
        } else {
            $isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
        }
        if (!defined('MODX_URL_SCHEME')) {
            $url_scheme=  $isSecureRequest ? 'https://' : 'http://';
            define('MODX_URL_SCHEME', $url_scheme);
        }
        if (!defined('MODX_HTTP_HOST')) {
            if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
                $http_host='dlslegal.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);
            }
        }
        if (!defined('MODX_SITE_URL')) {
            $site_url= $url_scheme . $http_host . MODX_BASE_URL;
            define('MODX_SITE_URL', $site_url);
        }
        if (!defined('MODX_ASSETS_PATH')) {
            $modx_assets_path= '/var/www/web/assets/';
            $modx_assets_url= 'assets/';
            define('MODX_ASSETS_PATH', $modx_assets_path);
            define('MODX_ASSETS_URL', $modx_assets_url);
        }
        if (!defined('MODX_LOG_LEVEL_FATAL')) {
            define('MODX_LOG_LEVEL_FATAL', 0);
            define('MODX_LOG_LEVEL_ERROR', 1);
            define('MODX_LOG_LEVEL_WARN', 2);
            define('MODX_LOG_LEVEL_INFO', 3);
            define('MODX_LOG_LEVEL_DEBUG', 4);
        }
        if (!defined('MODX_CACHE_DISABLED')) {
            $modx_cache_disabled= false;
            define('MODX_CACHE_DISABLED', $modx_cache_disabled);
        }
        
        


        Quote from: benmarte at Dec 16, 2013, 09:06 AM
        When navigating to the manager or setup directory it is redirecting to http://preview4.reg365.net/manager instead of http://preview4.reg365.net/~dlslegal.ie/manager so I would say something in your settings or db that wasn't updated correctly.

        So review all your config files and make sure you follow the steps outlined here.

        Good luck.
          • 3109 ☆ A M B ☆
          • 894 Posts
          Did you check your error log? Any clues in there? Also you will need to re-install most plugins or extras since they sometimes break when moving to a new server.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 22840
            • 1,572 Posts
            All the paths in your config file look to be incorrect, for example:

                $modx_assets_path= '/var/www/web/assets/';
                $modx_assets_url= 'assets/';


            I would imagine should be:

                $modx_assets_path= '/var/www/web/assets/';
                $modx_assets_url= '/~dlslegal.ie/assets/';


            Rerun setup in upgrade mode and the paths should be corrected, also delete everything in core > cache
              • 37258
              • 34 Posts
              Hi Paul,

              I tried your suggestions and the CMS isn't even re-creating the cache files now! I think the issue is permissions based. I can't even get the setup page to show, its just returns a completely blank page.

              I may as well just delete everything and try running a fresh install for the moment.

              Thanks for your help.

              Quote from: paulp at Dec 16, 2013, 10:38 AM
              All the paths in your config file look to be incorrect, for example:

                  $modx_assets_path= '/var/www/web/assets/';
                  $modx_assets_url= 'assets/';


              I would imagine should be:

                  $modx_assets_path= '/var/www/web/assets/';
                  $modx_assets_url= '/~dlslegal.ie/assets/';


              Rerun setup in upgrade mode and the paths should be corrected, also delete everything in core > cache
                • 3749
                • 24,544 Posts
                You might consider SiteCheck, which will test all the paths and URLs for you and will also report any problems with directory permissions.

                https://gumroad.com/l/DLChJ

                http://bobsguides.com/sitecheck-tutorial.html
                  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
                  • 37258
                  • 34 Posts
                  Epic fail, I can't even get to the setup directory on a fresh install, off to moan at server admins instead of on here.

                  Cheers for the link Bob, your guides & knowledge have been very helpful in the past and your site is one my first ports of call if I have any technical issues.
                    • 53432
                    • 46 Posts
                    Modx has multiple config files, and they are helpfully scattered all over the Modx directory structure. Check them all:

                    public_html/config.core.php
                    public_html/core/config/config.inc.php
                    public_html/manager/config.core.php

                    Manually delete everything in:
                    public_html/core/cache/

                    Path info is written to files by all installed packages, in here:
                    public_html/core/packages/somepackage/preserved.php

                    You should replace all instances of the old path with the new one.

                    Finally, the database itself will contain the path. do a find/replace on the SQL dump before loading the database on to the new server.