We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15865
    • 6 Posts
    I’ve loaded a MODx setup & config into a webserver, and have created all documents, templates & template variables. I’ve also loaded all images into the webserver.

    The page (unpublished yet) is on: http://mydomain.com/modx
    And the images are on: http://mydomain.com/modx/images (I currently haven’t any access to this location).

    I logged into the MODx as admin, and set the following:
    Tools > Configuration > File Manager > File Manager Path = http://mydomain.com/modx

    My problem is the following:
    When I go to Manage Resources > Manage Files, there aren’t any files but only a message that says:
    Invalid path ’http:/mydomain.com/modx/’

    What’s wrong with this setup?
    Pre-thanks for answering...

    Alan.


    Web Server:
    * PHP version: last
    * Apache version: last
    * Operating System: Unknown

    Database:
    * MySQL version: last (very basic tables, working properly)

    MODx:
    * Version: last

    Browser/Client:
    * Browser: Firefox v2
    * Operating System: Linux Debian (last) w/Gnome
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That’s not a path, that’s a URL. A path will look like
      /Assets/MAMP/htdocs/modx/
      on a MAMP setup on OS X. It will look different on other platforms. Perhaps
      /home/mydomain/public_html/modx/
      or
      C:\www\modx\
        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
        • 15865
        • 6 Posts
        I’ve finally solved this problem. Don’t know why, but this works... very weird.

        Resource Path: "W:/websites/clients/www.mydomain.com/html/modx"
        Resource URL: "/html/modx"

        If someone could explain why this works, it would be terrific! smiley
        Another question... Is there any config for File Manager to show "images previews" in the File Manager Browser?

        Thanks! Cheers...

        Alan.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Because that is your full path to the files of your MODx installation in the first line, and the second line is the URL from the Web root. Two different things.

          The path starts at the root of your file system, in your case it looks like a Windows server with a W drive. I think in this case you can use either \ or / for a Windows server, but I haven’t used one for so many years that I’ve forgotten.

          The URL starts at the web root, which is where the Web server starts serving pages from.

          So path = physical files on the physical server, while URL = virtual filespace made by the Web server. You can also have a full URL, like http://www.domain.com/html/modx (the http://domain.com/ is the web server’s equivilent to the physical server’s W:/ part)

          You can see your actual physical path if you go to Reports -> System info. On that page there is a phpinfo() View link. Click on that, and in the last block (SERVER variables) you’ll find several that make reference to the path.
            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
            • 27821
            • 3 Posts
            I have the same problem, but can’t fix it (modx 0961).
            Actually changing paths in tools/configuration/file manager (or interface&features) does not affect the ’invalid path’ message in ’manage files’ alert.

            Could it been, that some configuration files aren’t writable?

              • 28042 ☆ A M B ☆
              • 24,524 Posts
              It’s all in the database, so changing it in the Manager -> Tools -> Configuration and the file manager tab will change it. You just have to change it to the correct path.

              This also can be set for each individual manager user, so you might want to check if those are set to something different.
                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
                • 20570
                • 6 Posts
                Hi All,

                My File manager is giving me grief too. I’ve read through the explanations about the URL and Paths. But I still need a translation.

                On the PHP info page, does _SERVER["DOCUMENT_ROOT"] = Resource Path: ?

                And does Resource URL: = a relative url to the assets folder? So, "assets/" would be the default Resource URL to the images folder for instance. Is that right?

                I’ve setup two Modx installs on dev server without any problem getting the file manager to work. Of course the production server seems to be unresponsive to all suggestions I’ve found here on the forum.


                Thanks in advance,

                Marc

                  • 20570
                  • 6 Posts
                  I finally got this resolved on my server (Linux, Apache 2.x, php5.x, MySql 3.2x). The key on my server was to include the assets folder in the File Manager Path. Here’s what I did.

                  1. removed all settings at the user level, Security-->Manager Users-- User. Unchecked all the boxes, emptied the resource path and url fields.

                  2. Tools-->Config-->File Manager uses the contents of _SERVER["DOCUMENT_ROOT"] including the assets folder.

                  ex. File Manger Path: /home/httpd/vhosts/mysite.com/httpdocs/assets/

                  3. Tools-->Config-->Interface & Features, very similar to above

                  Resource path: /home/httpd/vhosts/mysite.com/httpdocs/assets/
                  Resource URL: assets/

                  Hope this helps anyone else struggling to get the File Manager to behave. When troubleshooting path and urls issues, I’d also recommend to start with the File Manager. The best bit of feedback I got from the adjustments I made was when the Access Denied! error turned into a an Invalid Path error. The Access Denied! warning was totally useless because it gives no hint what the next step should be. After finding the settings the server and the File manager would except, it seems there is really only an invalid path or success. Access Denied! totally muddies up the trouble shooting process because its derived from an invalid path. From the users point of view, the path is either wrong or it just works.

                  Now, on to the FCKeditor and Friendly URLS.

                  Marc


                    • 2297
                    • 31 Posts
                    Quote from: mtringal at May 08, 2008, 11:08 AM

                    Hope this helps anyone else struggling to get the File Manager to behave. When troubleshooting path and urls issues, I’d also recommend to start with the File Manager. The best bit of feedback I got from the adjustments I made was when the Access Denied! error turned into a an Invalid Path error. The Access Denied! warning was totally useless because it gives no hint what the next step should be. After finding the settings the server and the File manager would except, it seems there is really only an invalid path or success. Access Denied! totally muddies up the trouble shooting process because its derived from an invalid path. From the users point of view, the path is either wrong or it just works.

                    I just discovered that leaving out the final trailing slash will result in an "access denied" message under "Manage Files," even with the correct path set in Tools / Configuration / File Manager / File Manager Path.

                    example:

                    home/yourdomain/modx/assets gave me the "access denied" error.

                    home/yourdomain/modx/assets/ (note the final trailing slash / after "assets") gave me the file listing.

                    HTH