We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3677
    • 130 Posts
    I’ve read the guide for moving a site. http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server

    For the home page I was getting Server Error 500. Renamed my .htaccess file so that was not the problem. Cleared out the cache and updated all paths according to the guide.

    Decided to try to run the setup over the top of the install. Couldn’t get setup to run until I worked through some issues with file permissions being set incorrectly for an SuExec PHP setup. I modified the permissions on all folders and files. Then I got the setup to run successfully.

    But I still have the same problem when I try to access the manager. I get a few error messages such as:
    "Warning: include_once(/core/model/modx/modx.class.php) [function.include-once]: failed to open stream: No such file or directory in /home/mosa/public_html/manager/index.php on line 47"

    Now this is weird because it seems that ModX is seeing the home folder for my cpanel account (home/mosa) which would explain why the root path "/core..." is failing. I looked at the config.inc.php file after running setup and it actually hardcoded that path into the file. I want to prevent any visibility beyond the "public_html" folder which should be the web root. My hosting account is a VPS so I have root access, WHM, and CPanel. Not sure what I am missing. Any ideas?

    Thanks,
    -Brian
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      You are trying to place the core folder above public_html? If you moved the folder just rerun setup and it should update the paths resolving the issue.

      In regards to permissions 644/755 should be the default on phpsuexec setup (anything more gives 500 errors).
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 3677
        • 130 Posts
        Thanks for the reply.

        Those are indeed the file permissions I used. Applied them using Filezilla.
        I am actually just wanting a standard install such that the web root is public_html. This is where I’ve put all the files. When I re-ran setup, I ended up with the path "home/mosa/public_html" instead of just "/". I just don’t get how the installer is seeing that path that includes the cpanel home folder.
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          The full path is likely being retrieved via php which would result in the /home/user/public_html/

          If you attempt to use just / I suspect the site will fail to function properly... There shouldn’t be any security issues with the full path being used, you just need to rerun setup should you move the site to a new location.

          Perhaps someone else can elaborate on why the full path is needed, but I know it’s common to find in most scripts.
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 3677
            • 130 Posts
            Hmm...maybe I am barking up the wrong tree then.

            I noticed that setup will only run as an upgrade if the config.inc.php files already exists. Should setup correct all modx paths in the config file when you run it as an upgrade? I ask because I noticed that after running setup I end up with some paths that begin with "/home/mosa/public_html/" and others that just begin with "/" such as /connectors and /manager.
            I’ve attached my config file to demonstrate.
              • 3677
              • 130 Posts
              Hoping to get some insight to this problem today...

              These are the specific errors I am getting:
              Warning: include_once(/core/model/modx/modx.class.php) [function.include-once]: failed to open stream: No such file or directory in /home/mosa/public_html/manager/index.php on line 47

              Warning: include_once() [function.include]: Failed opening ’/core/model/modx/modx.class.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/mosa/public_html/manager/index.php on line 47

              Warning: include(/core/error/unavailable.include.php) [function.include]: failed to open stream: No such file or directory in /home/mosa/public_html/manager/index.php on line 48

              Warning: include() [function.include]: Failed opening ’/core/error/unavailable.include.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/mosa/public_html/manager/index.php on line 48
              Site temporarily unavailable!


              I am wondering if I should just do a fresh install on the production site and then replace the db with my local database?

              -Brian
                • 18373 ☆ A M B ☆
                • 3,141 Posts
                Are those files it is trying to include existing on your server? Check them through your FTP
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 3677
                  • 130 Posts
                  Mark,

                  Yes the files are there. I’ve decided to move everything to a backup and do a brand new installation on the production site to see if that works as a starting point.
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    I think the problem is then the absence of home/user/public_html/ before the core path - that’s supposed to be there even when you have the core in the webroot. As it tried to include /core/.. it’s an absolute call from the root, which is home for php.

                    I wonder why running setup in upgrade didn’t modify that properly... new setup should be fine then.
                      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                      • 3677
                      • 130 Posts
                      The fresh installation worked just fine. I looked at the paths in the resulting config file and they were more consistent (including the home folder in all cases).
                      So if the installer is supposed to correct any invalid paths when run as an upgrade...I’d have to say there is a bug of some sort.

                      -Brian