We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10208 ☆ A M B ☆
    • 1,780 Posts
    This is a hard one to title. Sorry. I've got a major problem with a server. I need advice and any help possible.

    I have installed MODX 2.2.4-pl through SimpleScripts on a shared Start Logic server. Type is Debian, running PHP 5.3 and MySQL 4.1.22.

    MODX installed fine, yet for some reason it used what I've been told is an ancient path (not used anymore)
    It was similar to this:
    /hermes/bobsweb072/b2181/client_path/public_html/modx_subfolder

    It should have been:
    /home/users/web/b2181/client_path/public_html/modx_subfolder/

    Right, so I didn't know it wasn't the correct path till I had issues, re-run setup once, and contacted the server support. I changed the config.inc.php paths, and I believe I either changed or checked all the other files as well. Since then, I've copied the install files to the MODX root which has overwritten the three config files.

    It seems as if it's possible that the folders didn't copy when I ran setup before. I might have copied them via sftp after unpacking. I honestly don't remember, but setup ran fine. I did not notice if it used the wrong path. This was a few weeks ago.

    When I tried to move the unpacked files recently to attempt another re-install, the file manager at this server only moved files. It would not move or copy folders. That's about frustrating... however I got the support agent to move them for me. (I really hate this server's CP and file manager - not cPanel)

    OK, so I've got tons of errors pointing to this ancient path, both in the php log as well as MODX depending on what I do. Here's the interesting part... It changes!! It was first hermes/bobsweb, and then in early August it changed to hermes/bosweb (I have a copy of an error log that shows this). Now, it's hermes/bosoraweb and the server agents tell me that they may change this storage platform path in the future as well. Seriously??

    Somehow, somewhere... MODX is calling up this path and allowing it to change, while not actually being able to find it for scripts and packages, etc. I'm so confused! The server is clueless, and tells me things like "there's no site.com/services" folder, will you check to see that it exists?" and to "set the path in the setup folder files before running setup". Where's the rolling eyes smilie anyway?

    It also seems that every time I make php.ini changes in their CGI scripting module, it only partially takes. Weirdness is, in the MODX php.info I can see the changes, but when I check php.ini directly (through CGI) it may or may not be there. cURL for example, shows as on but yesterday they claimed it was off and that they've turned it on for me. Whatever... oh, I hate the CGI php.ini editor there as well.

    I don't know why I can't just edit the darn file! It's like moving from windows 3.1.1 to windows 95 all over again. Stupid, stupid dummy buttons that I don't need or want!

    This server is getting on my last nerves. Countless unpaid hours have gone into this carp. I'm beating my head against a brick wall with them and this path issue. They're sending it somehow, changing it, and it will not go away. I can't run setup because the pre-install check page clearly shows that it's finding and using the wrong path.

    If I set the three php.config files with the correct path, the site goes down both front and back. Right now they are looking for '/core/' and it's working. If I enter the path the server wants me to use, 503 and 404 errors show.


    /config.core.php
    /connectors/config.core.php
    /manager/config.core.php

    All three set as follows:
    <?php
    define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');
    define('MODX_CONFIG_KEY', 'config');
    


    I can run setup with these files set to the correct path, but the pre-install page still pulls out the wrong path.

    I don't know what else to tell MODX to do to get the correct path. It seems to be affecting the fileUploadR script, which can't find the path even though it's set specifically in the call. Packages continue to look for the incorrect path and error when I view Package Management. Scripts from packages try to call this path, and error. I think the modal view for mxcalendar is gorked because it's looking for that path too. At least I'm hoping the path issue is the problem...

    All in all, I'm about ready to cut my losses and move the site to my server. Problem is, the client paid for 3 years (!!) at this server and it's going to be a process to get her money back (if at all possible). Either way, I lose more. I've already lost so many hours and I'd prefer not to have to GIVE her hosting just so I can work in MODX without issue.

    help...? please?




      Frogabog- MODX Websites in Portland Oregon
      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
      Having server issues? These guys have MODX Hosting perfected - SkyToaster
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Check the core/configs/config.inc.php file carefully; there are a number of lines where the paths are hard-coded.

      After that's done, delete the cache folders and see what happens.

      You also might want to check the database in the system_settings table for any occurrences of the wrong path.

      If the hosting company keeps changing their path structure, there isn't a whole lot you can do about it. Also, some badly configured distributed servers can cause serious problems when different servers catch a request and don't have the identical file structure mirrored properly.
        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
        • 3749
        • 24,544 Posts
        That sounds really unpleasant.

        There is also a config.core.php file in setup/includes. It's critical for running Setup.

        Be sure to delete all files in the core/cache directory and clear your browser cache and cookies before running Setup. I'm not sure it will help, but it can't hurt.

        You could also check the path in the modx_workspaces table in the DB.


        ------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using.
        MODX info for everyone: http://bobsguides.com/modx.html
          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
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          Thanks Susan and Bob, thanks very much.

          Unfortunately I've checked most these things prior to posting here (I do try to figure it out myself first!). I ran a search in MySQL and only found my uploaded image files pointing to that path. In the modx_workspaces table it shows {core_path} in the path field, and that seems fine to me. I've checked and re-checked the config.inc.php file and I can only verify that I've done everything correctly there.

          I looked through all the config files in setup, and the only ones that seemed to do the calling of the server path are path_search.php and perhaps url_search.php, but I think that one sets the base_url for MODX which ignores the server path.

          The problem seems to lie in their configuration. I've run install through SimpleScripts to the root, and also another subfolder test install manually (with manual db creation). Any time I run setup, it shows me a pre-install page that calls the wrong path.

          Interestingly enough, On the simpleScripts install I tested at the root level, I ran into the "no CSS manager login page", plus login with admin password (set by simpleScripts) broken issue that has come up on the forums. It would not log me in. It also would not use index.php when I renamed index.html (existing static site). I deleted the install. I'm skeered to move this install from subfolder to root now.

          In the end, I'm coming to the conclusion that MODX can only retrieve the path from the server, and if that's not correct... nothing I can do will fix it. I'd really prefer to have this site on my server anyway. I think she can get some money back. What a waste of time though...

          Changing the name of the path every few weeks or whatever they do... ain't compatible with MODX. It should not be offered if they can't set a consistent and accurate server path.

          Hrumpf!! That's what I have to say.

          I appreciate the help, even if it confirms what I already knew.


          [ed. note: frogabog last edited this post 14 years, 1 month ago.]
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 3749
            • 24,544 Posts
            Yes, MODX sets the site_url System Setting based on the URL the user comes in on. URLs used in the site are based on that via this tag in all templates:

            <base href="[[++site_url]]" />



            (You do have that in the head of all templates, right?)

            On some sites, you need to use this (with the exclamation point), so you might give it a try:

            <base href="[[!++site_url]]" />



            It's not an ideal solution, but you might be able to use a plugin, tied to a number of System Events that sets the site_url setting to the correct, hard-coded value;

            $modx->setOption('site_url', 'correct/url');




            ------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using.
            MODX info for everyone: http://bobsguides.com/modx.html
              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
              • 36173
              • 26 Posts
              Hey all,
              The exact thing is happening to me now! sad

              The old server path keeps appearing...running setup seems to rewrite MODX_CORE_PATH setting in the root config file.


                • 3749
                • 24,544 Posts
                Just about everything that has to do with paths (other than .htaccess) is in these four files:

                core/config/config.inc.php
                config.core.php
                manager/config.core.php
                connectors/config.core.php

                BTW, SiteCheck will test all of the paths for you and a lot more, though you can certainly check them all by hand.
                  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