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

    I found out today that in one of my MODx installations the file manager path as given in the MODx manager (Tools/Configuration/File Manager --> File Manager Path) is different from the "filemanager_path" in the SQL database:


    • File Manager Path: /var/www/modx/
    • Database entry: INSERT INTO `modx_system_settings` VALUES (’filemanager_path’,’/var/www/
      modx/assets/’);


    I guess the path in the database might be the reason why the resource manager (mcpuk) has not been working properly, so I would like to correct this entry.

    Unfortunately, I have no experience with databases. Therefore it would be great if someone could tell me how to accomplish this task using phpMyAdmin.

    Best regards,

    Stefan
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you use the Configuration and put in the correct path then save it will save to the database and the cache file as well.
        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
        • 4414
        • 63 Posts
        This is exactly what does not work for me. I know this is weird, but whatever path I type into the configuration, the path in the database does not change.

        I started with MODx 0.9.6.3-RC3, then upgraded to 0.9.6.3 final and finally to 1.0.0-RC1. Through all the time I have never been able to use the mcpuk resource manager because whatever path I typed for the file manager it did not work.

        The path set in the manager right now is correct, as far as I know, but the value in the database is not. Therefore I am looking for a way to change the value in the database directly.

        Hope anyone can help me out here.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Something is very wrong here. The Configuration saves directly to the database. Are you sure you’re looking at the right database? Sometimes I have more than one installation and have to pay attention to make sure I’m looking at the correct database.

          You can go to the system_settings table and directly edit the field, but if you do that you’ll also need to edit the appropriate line in the assets/cache/siteCache.idx.php file, which is what MODx actually uses.

          You can verify your path by looking at Reports -> System Info, and the phpinfo view link. Scroll to the Apache Environment block and look for DOCUMENT_ROOT and SCRIPT_FILENAME. You can also find these near the bottom, in the PHP Variables block with _SERVER[DOCUMENT_ROOT] and _SERVER[SCRIPT_FILENAME].
            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
            • 4414
            • 63 Posts
            I made a fresh backup of my database and looked up ’filemanager_path’. Now it is correct again, despite I did not change anything in configuration:
            File Manager Path: /var/www/modx/
            Database: INSERT INTO `modx_system_settings` VALUES ('filemanager_path','/var/www/modx/');
            DOCUMENT_ROOT: /var/www/
            SCRIPT_FILENAME: /var/www/modx/manager/index.php
            

            Seems there is no need to mess with the database anymore. However, the resource manager is still not working. I tried every "trick" in this forum but with no effect. I have another MODx install where mcpuk is actually working.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Ah. That’s a different matter. The file manager is not the same as the resource manager. The settings for the resource manager are in the Interface and Features tab. It should be something like
              /var/www/modx/assets/

              while the File Browser URL should be something like
              assets/

              Keep in mind that the file path and the URL will be based on different roots; the file path will be based on your server root, while the URL will be based from your web root.
                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
                • 4414
                • 63 Posts
                My configurations are exactly like this. But the resource manager still is not working (no thumbnails are shown, and file upload stops at 0%).
                  • 4310
                  • 2,310 Posts
                  I’ve come across this on some servers.
                  Try the full url/assets/ as the setting for File Browser URL.
                  That has fixed it for me. smiley
                    • 4414
                    • 63 Posts
                    Thank’s for this tip!