We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38359
    • 93 Posts
    Hi there,

    A site that has been working fine for 12 months has just started saying 'Site temporarily unavailable!' when I try to log in on the manager. On the front end certain things which use GetResources to display aren't working.


    Any help would be greatly appreciated.
      • 38359
      • 93 Posts
      Looking at the error log I'm seeing a couple of errors:

      First one relating to Gallery:

      [Tue Jul 05 10:35:59.930209 2016] [fcgid:warn] [pid 29744] [client 69.63.188.116:34744] mod_fcgid: stderr: PHP Warning:  require_once(/home/linweb43/h/holters.co.uk-1088396631/user/htdocs/config.core.php): failed to open stream: No such file or directory in /home/linweb43/h/holters.co.uk-1088396631/user/htdocs/assets/components/gallery/connector.php on line 34


      Second one to the manager?

      [Tue Jul 05 10:38:51.055220 2016] [fcgid:warn] [pid 16819] [client 80.195.23.81:43958] mod_fcgid: stderr: PHP Warning:  include(): Failed opening '/home/linweb26/h/holters.co.uk/user/htdocs/core/error/unavailable.include.php' for inclusion (include_path='.:/usr/share/pear') in /home/linweb43/h/holters.co.uk-1088396631/user/htdocs/manager/index.php on line 51
        • 38359
        • 93 Posts
        OK, so line 34 in assets/components/gallery/connector.php is:

        require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php';


        Which I'm guessing is the main config.core.php file in the root?

        I've had a look and instead of config.core.php, the file in the root is called config.php
        Should that actually be config.core.php?
          • 3749
          • 24,544 Posts
          Take a look inside the file. The config.core.php file only has two lines -- one to tell where the core is, and the other to specify the config key.

          If that's what you find, it should definitely be called config.core.php.

          There should also be one in the manager directory and in one in the connectors directory.

          It's possible that your site has been hacked. Check your plugins (in the DB if necessary in the modx_site_plugins table). See if you have a Core Services plugin (a common hack), or any other plugins that shouldn't be there.
            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
            • 38359
            • 93 Posts
            Thanks for the reply BobRay, I checked and there is no Core Services plugin installed.
            I changed the config.php file to config.core.php but that didn't work - 502 error on the front end and the same 'Site temporarily unavailable!' error on the manager.
            I'm going to try to copy re-deploy the site on my local machine with a fresh install and see if I still get the error.
              • 3749
              • 24,544 Posts
              Check the site_status System Setting in the modx_system_settings table in the DB. It will throw that exact error if it's turned off.

              The worrisome thing is what happened to your config.core.php file.

              Does the config.php file contain what I described above?

                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
                • 38359
                • 93 Posts
                Quote from: BobRay at Jul 06, 2016, 11:42 AM
                Check the site_status System Setting in the modx_system_settings table in the DB. It will throw that exact error if it's turned off.

                The worrisome thing is what happened to your config.core.php file.

                Does the config.php file contain what I described above?


                The config.php file contained exactly what the config.core.php file contained and nothing more. I've reinstalled on the latest version of Modx using the same database and it's all working fine now, so the site_status must have been set to on. Very strange.
                  • 3749
                  • 24,544 Posts
                  Maybe you renamed the file in your sleep? 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