We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • discuss.answer
    • 36977
    • 36 Posts
    Quote from: BobRay at Aug 07, 2014, 04:36 PM
    I would hard-code this whole path in the MODX_CORE_PATH definition in config.inc.php:

    core/model/modx/processors/getrecentlyeditedresources.php

    Check the permissions and ownership on the mgr.css file in the 401 error above.
    The permissions are 644 for that file. Is that correct?

    I have changed that line in the config file.

    I changed the URLS in the config back to the ones that previously didn't present any errors in your sitechecked, but have ran site checker again and am now getting this message:

    Checking MODX_CONFIG_KEY.inc.php
    Checking all paths in main config file
    ALL PATHS OK!
    Checking all URLs in main config file
    MODX_SITE_URL: (http://www.terasaki.se) is invalid


    Where is this file?
      • 3749
      • 24,544 Posts
      It's core/config/config.inc.php. $site_url is usually defined like this:

          $site_url= $url_scheme . $http_host . MODX_BASE_URL;
          define('MODX_SITE_URL', $site_url);


      $url_scheme is defined above (normally it will be http://)
      MODX_BASE_URL is also defined above. It's usually '/' if the site is not in a subdirectory.

      644 is usually correct for a file (if the host is running suPHP, suExec, or something similar), the the permissions on the directory could also be a factor, though. It should probably be 755.


        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
        • 36977
        • 36 Posts
        I've changed it to 755 and added '/' to MODX_BASE_URL and am no longer getting that error.

        Could the problems be anything to do with this which we commented out of sitchecker?

        checkCharset
          • 36977
          • 36 Posts
          Just checked the error log and back to these error messages:

          [Fri Aug 08 00:48:33 2014] [warn] [client 92.30.97.196] mod_fcgid: stderr: PHP Warning:  include_once(/var/www/vhosts/terasaki.se/httpdocs/var/www/vhosts/terasaki.se/httpdocs/core/model/modx/modx.class.php): failed to open stream: No such file or directory in /var/www/vhosts/terasaki.se/httpdocs/manager/index.php on line 50
          [Fri Aug 08 00:48:33 2014] [warn] [client 92.30.97.196] mod_fcgid: stderr: PHP Warning:  include_once(): Failed opening '/var/www/vhosts/terasaki.se/httpdocs/var/www/vhosts/terasaki.se/httpdocs/core/model/modx/modx.class.php' for inclusion (include_path='.:') in /var/www/vhosts/terasaki.se/httpdocs/manager/index.php on line 50
          [Fri Aug 08 00:48:33 2014] [warn] [client 92.30.97.196] mod_fcgid: stderr: PHP Warning:  include(/var/www/vhosts/terasaki.se/httpdocs/var/www/vhosts/terasaki.se/httpdocs/core/error/unavailable.include.php): failed to open stream: No such file or directory in /var/www/vhosts/terasaki.se/httpdocs/manager/index.php on line 51
          [Fri Aug 08 00:48:33 2014] [warn] [client 92.30.97.196] mod_fcgid: stderr: PHP Warning:  include(): Failed opening '/var/www/vhosts/terasaki.se/httpdocs/var/www/vhosts/terasaki.se/httpdocs/core/error/unavailable.include.php' for inclusion (include_path='.:') in /var/www/vhosts/terasaki.se/httpdocs/manager/index.php on line 51


          This makes me think that there is some setting which is putting the URLs together incorrectly, or somewhere I have a URL that I shouldn't. Any ideas?
          • discuss.answer
            • 3749
            • 24,544 Posts
            Yes, this is almost certainly something wrong in the config.core.php file in the manager directory.

            This is why you're getting the Site Unavailable message. It happens when the index.php file in the Manager directory can't find the MODX class file.

            Since the front end works, the config.core.php file in the MODX root (httpdocs) must be correct. If it contains an actual path (rather than dirname(...)), just copy it to the manager directory and the connectors directory, overwriting the ones there.

            I'm guessing, but I think those three config.core.php files should be defining the core path like this:

            define('MODX_CORE_PATH', '/var/www/vhosts/terasaki.se/httpdocs/core/');


              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
              • 36977
              • 36 Posts
              Woohoo!! Delighted! Got up this morning and seemed to have fixed it!!! For some reason my manager/config file looked like this:
              define('MODX_CORE_PATH', dirname(dirname(__FILE__)) . '/var/www/vhosts/terasaki.se/httpdocs/core/');
              define('MODX_CONFIG_KEY', 'config');


              Changed it to:
              define('MODX_CORE_PATH', '/var/www/vhosts/terasaki.se/httpdocs/core/');


              And all works again. Thank goodness for that! Thanks so much for all your help, very much appreciated! smiley
                • 3749
                • 24,544 Posts
                I'm really glad you got it sorted. smiley

                Thanks for reporting back.
                  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