We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15451
    • 87 Posts
    hi there,
    i’m having a go at uploading a locally developed site to my remote hosting. is my first time and while i’m doing my best to follow the upload instructions, i think maybe [well, for sure] i’m getting some bits wrong...

    the error i’m getting is...

    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Unknown(/test/assets/plugins/phx/phx.parser.class.inc.php): failed to open stream: No such file or directory
    Error type/ Nr.: Warning - 2
    File: /home/content/k/a/t/kathleenread2/html/test/manager/includes/document.parser.class.inc.php(745) : eval()’d code
    Line: 19

    i’ve got a screen shot of my remote directory at www.cheerytomato.com/directory.jpg which might show someone what i’m doing wrong? and two other screen shots are www.cheerytomato.com/file_manager_tab.jpg and www.cheerytomato.com/interface_features_tab.jpg

    and this might be a really dumb question, but when i have a test site that’s local, if it has a table prefix of ’modx_’ and then i have a go at making another test site, it needs a different table prefix. what does that table prefix actually do and where is it stored? i had thought that if i was working on a different site i’d be able to use whatever name i wanted...? this is my first time working with databases so sorry for the ignorance. thanks very much for any help, it’s greatly appreciated.
      • 3749
      • 24,544 Posts
      Kathleen, I assume that you followed the steps here: http://modxcms.com/moving-sites-to-new-servers.html

      If you can use the Manager at all, you are close.

      The table prefix is just what you guessed. It’s so you can run two or more separate MODx sites on the same server. You can (and probably should) use the same table prefix on your local site and the remote duplicate of that site. It will make your life a lot simpler.

      From the error message, I’d say that your problem is not the database. MODx can’t find an actual file on the server.

      As you suspected, your file path settings in the File Manager tab and Interface & Features tab need correcting.

      They should be the full physical path to those directories.

      Do the File Manager one first, it should be something like this:

      /home/your_user_name/public_html/test/ (That’s your username with the hosting service, not the DB or the MODx username)

      You’ll know it’s right when you can browse the files successfully when you click on Manage Files on the Resources tab.

      Once you have that, correct the one on the Interface & Features tab to match (plus /assets).

        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
        • 15451
        • 87 Posts
        thanks so much for your help bob. they were the instructions i was following [or in my case was trying to!].
        again, sorry for my complete lack of even a basic knowledge of this, when entering the full physical path to the directories, how did you know the ’/home/your_user_name/public_html/’ part? i was entering what i could see in my directory only i wouldn’t have known to put in ’home’ etc. is that just me not knowing the basics i guess? undecided
        so i’ll try ’/home/kathleenread2/public_html/test/’ and see how i go...
        thank you!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          A good way to find your paths is to go to Reports -> System Info, and click the View link for phpinfo(). Scroll to the bottom, and you’ll see a whole block of server information; among these will be _SERVER["DOCUMENT_ROOT"] and _SERVER["SCRIPT_FILENAME"] that have the path you’ll need. Of course, the SCRIPT_FILENAME value will be for the actual script making the request, which is the manager/index.php file, but you’ll be able to see that your path is whatever comes before that part. In my case, it’s
          /home/sottwell/public_html/manager/index.php
          so my paths are /home/sottwell/public_html/assets.

          This is not always the case, it all depends on where your site admin puts your website files. It might be /sites/k/www, or some other path; the only constant is that it will start with /, indicating the beginning (root) of the server’s file structure (just like / in a URL indicates the root of your website, so be careful not to confuse the two!)

          For example, my local Mac development environment is located at /Applications/MAMP/htdocs.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 15451
            • 87 Posts
            thank you very much too, susan. i found that info you mentioned, for me next to the _SERVER["DOCUMENT_ROOT"] part is /home/content/k/a/t/kathleenread2/html so i’ll use ’/home/content/k/a/t/kathleenread2/’. i never would’ve known that so i don’t feel quite so dumb now wink. will let you know if i have some joy...
              • 3749
              • 24,544 Posts
              Quote from: sottwell at Aug 16, 2008, 02:50 AM

              A good way to find your paths is to go to Reports -> System Info, and click the View link for phpinfo(). Scroll to the bottom, and you’ll see a whole block of server information; among these will be _SERVER["DOCUMENT_ROOT"] and _SERVER["SCRIPT_FILENAME"] that have the path you’ll need.

              What a good idea. I’ve always found mine by stumbling around in cPanel’s file manager. embarrassed

              @Kathleen: Don’t feel bad. It’s not something you could have guessed and we all struggled with it when we started out.
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                It’ll need to be
                /home/content/k/a/t/kathleenread2/html/
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 15451
                  • 87 Posts
                  i don’t know how to say a thank you big enough for all your help. i am so happy, today it worked!! i used the path as you said, thanks so much susan [i would’ve missed the’html’ part otherwise] and i followed those steps to the word in the link you pointed to bob. that was the main part left for me to feel confident enough to think i could use modx in a basic way, so am cheerin’!
                  can i follow on with another question... when installing modx, there are the options of ’new install’, ’upgrade’ etc. when would you ever need to upgrade? is that if you’ve made the site ages ago and just updating snippets here and there wouldn’t do the trick?
                  thank you again and again. grin grin grin
                    • 3749
                    • 24,544 Posts
                    I’m glad it worked for you. grin

                    The upgrade install is useful when a new version of MODx is released and the MODx core is out of date. You’re right that snippets can be updated without doing a full upgrade install.

                    Another use of the upgrade install is when you move a site to a new server or new directory by moving all the files and importing the db info. The upgrade install resets the settings that tripped you up (among other things) to match the new location, but it doesn’t always work and sometimes you have to set them manually.

                      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
                      • 15451
                      • 87 Posts
                      thank again bob. so does that mean that another way of getting a local site to a remote location is to not worry about editing the config and htaccess files, but to just upload all the local files, assets and the like, then upload the install folder again and install modx again remotely? i think now i’ve found the way that works for me i’d stick with that, only is good to understand other options.
                      thank you for your patience and time. laugh