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

    I'm having a problem with running the setup after following the instructions in the manual to harden modx. When trying to run setup, it prompts me to enter the new core folder location, but after successfully doing that, I get the following errors:

    Warning: require_once(/home/user/domain/core/model/smarty/plugins/modifier.replace.php): failed to open stream: No such file or directory in /home/user/newcorefolder/cache/setup/smarty/1887e217a86c78d7083542f9ed97f3c811711a40_0.file.footer.tpl.php on line 24
    
    Fatal error: require_once(): Failed opening required '/home/user/domain/core/model/smarty/plugins/modifier.replace.php' (include_path='.:') in /home/user/newcorefolder/cache/setup/smarty/1887e217a86c78d7083542f9ed97f3c811711a40_0.file.footer.tpl.php on line 24


    Have I missed something? Or have I done the wrong thing when unpacking the files for the setup?

    I'll include the steps I took when unzipping/copying just in case.

    unzipped the modx-traditional installer and copied the content folders individually over the new folder locations
    i.e. copied /home/user/modx-2.5.6-pl/core to /home/user/newcorefolder/
    copied home/user/modx-2.5.6-pl/connectors to /home/user/domain/newconnectorsfolder/
    copied home/user/modx-2.5.6-pl/manager to /home/user/domain/newmanagerfolder/

    Is this correct?

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      • 38783
      • 571 Posts
      Did you specify the new path to the core folder in these files?

      /config.core.php
      /home/user/domain/newconnectorsfolder/config.core.php
      /home/user/domain/newmanagerfolder/config.core.php


      define('MODX_CORE_PATH', '/home/user/newcorefolder/');
      


      Then in /home/user/newcorefolder/config/config.inc.php change the path and url references to the new core, manager and connectors folders. Note that changing the core also makes it necessary to redefine the path to the processors folder.

      if (!defined('MODX_CORE_PATH')) {
          $modx_core_path= '/home/user/newcorefolder/';
          define('MODX_CORE_PATH', $modx_core_path);
      }
      if (!defined('MODX_PROCESSORS_PATH')) {
          $modx_processors_path= '/home/user/newcorefolder/model/modx/processors/';
          define('MODX_PROCESSORS_PATH', $modx_processors_path);
      }
      if (!defined('MODX_CONNECTORS_PATH')) {
          $modx_connectors_path= '/home/user/domain/newconnectorsfolder/';
          $modx_connectors_url= '/newconnectorsfolder/';
          define('MODX_CONNECTORS_PATH', $modx_connectors_path);
          define('MODX_CONNECTORS_URL', $modx_connectors_url);
      }
      if (!defined('MODX_MANAGER_PATH')) {
          $modx_manager_path= '/home/user/domain/newmanagerfolder/';
          $modx_manager_url= '/newmanagerfolder/';
          define('MODX_MANAGER_PATH', $modx_manager_path);
          define('MODX_MANAGER_URL', $modx_manager_url);
      }
      


      You should probably also empty the contents of the /home/user/newcorefolder/cache/ folder
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
      • discuss.answer
        • 52572
        • 5 Posts
        Hi Andy,

        Yes, I changed those references.

        I managed to get the installer running after copying /home/user/modx-2.5.6/core into /home/user/domain/core and discovering that the installer had the "I have already unzipped and placed the core folder" option flagged (probably because I have always used the traditional installer). I have now managed to successfully run the updater.

        Thanks for the reminder to clear the cache, too. I always always manage to forget that step.

        Cheers, Kahli