We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16348
    • 64 Posts
    Yes, i have that tag in my template.

    According to the about.html page for the plugin/snippet, it shouldn’t work with friendly url paths so my question is if someone has modified the plugin to make it possible.
      • 22640
      • 44 Posts
      Hi,

      Been working on trying to set this plugin up (without FileDownload snippet) and was wondering if this works when the directory in which the files are stored are outside the site’s root directory - not MODx’s root but the site’s.

      I’ve tried every possible directory structure in the TV, but nothing seems to work. I really don’t want the file URL to be guessed because they are protected in a members section.

      Using:
      MODx v.0.9.5
      FileDownloadPlugin 1.2


      Any ideas?
      Glenn
        • 21700
        • 42 Posts
        Hi guys ’n’ gals!

        First of all, thank you OnO: your script looks great! But I do have a quite big problem: the files don’t download, it just refreshes the page. They do list in the filedownload plugin! I already reinstalled both the FileDownload snippet and your plugin, following instructions closely to be sure I didn’t f*** smthn up there wink

        Anyway, the other stuff I tested:
        -disabled Friendly URL’s altogether & reset .htaccess;
        -tried completely without .htacess;
        -put FileDownloadPlugin on top of execution list @ webpageprerender. When that didn’t worked out I:
        -disabled all other plugins executing at onwebpageprerender;
        -tried both in and outside ’public_html’-folder;
        -chmod 777 on both files and directories;
        -tried the value both with and without trailing slash in FileDownloadFolder TV;
        -tried both large (about 7MB) as small files (approx 7KB).
        -both in IE6 as in FF3 same results..

        err.. guess I tried some more, can’t remember what else wink

        To get things straight: I don’t have to fiddle with the .htaccess when I use this plugin without friendly URLS, correct?

        Does anyone know what else I got to do to get this up and running? I also want to use this with SSL, any tips and tricks on that beforehand? I want everything as secure as possible, both because I’m paranoid like hell and because of the files hosted here are a matter of national security. Gonna install captcha’s @ login too smiley

        Thank you in advance,
        noes


        Oh by the way: server info:
        MODx version 0.9.6.1p2
        Version codename rev 3281
        PHP Version 5.2.3

        Apache Version Apache/1.3.37 (Unix) PHP/5.2.3 mod_ssl/2.8.28 OpenSSL/0.9.8a mod_perl/1.29 FrontPage/5.0.2.2510

        Loaded Modules mod_suphp, mod_php5, mod_security, mod_ssl, mod_perl, mod_frontpage, mod_setenvif, mod_so, mod_headers, mod_expires, mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_log_referer, mod_log_agent, mod_log_config, mod_env, mod_vhost_alias, http_core

        Configure Command ’./configure’ ’--with-apxs’ ’--with-imap=/usr/local/imap-2000e’ ’--with-freetype’ ’--with-freetype-dir=/usr/local/lib’ ’--with-curl’ ’--with-curl-dir=/usr/local/lib’ ’--with-gd’ ’--with-gd-dir=/usr/local’ ’--with-gettext’ ’--with-jpeg-dir=/usr/local/lib’ ’--with-kerberos’ ’--with-mcrypt’ ’--with-mhash’ ’--with-mysql=/usr’ ’--with-pear’ ’--with-png-dir=/usr/local/lib’ ’--with-xml’ ’--with-zlib’ ’--with-zlib-dir=/usr/local/lib’ ’--with-zip’ ’--with-iconv=/usr/local/lib’ ’--with-dom=/usr/lib’ ’--with-dom-exslt=/usr/lib’ ’--with-dom-xslt=/usr/lib’ ’--enable-exif’ ’--enable-xslt’ ’--with-xsl=/usr/lib’ ’--with-openssl’ ’--enable-bcmath’ ’--enable-calendar’ ’--enable-ftp’ ’--enable-magic-quotes’ ’--enable-sockets’ ’--enable-track-vars’ ’--enable-mbstring’ ’--enable-memory-limit’

        I hope I supplied you with enough information, please let me know if you need some more!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Files relating to national security available for download on the public Internet? If it’s all that sensitive, they should only be available via a secure vpn, or maybe sftp from a seriously firewalled and chrooted server. And captchas have been broken for quite some time now. Good luck with that rolleyes
            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
            • 21700
            • 42 Posts
            Like I said: I’m just being paranoid wink And off-topic..
              • 31471
              • 206 Posts
              Did anyone get around the +’& etc. characters in the filename-issue?
              These characters break the plugin causing the page to refresh with the filename at the end of the url - like it was a child page.
                • 21700
                • 42 Posts
                Everyone, the issue I mentioned before (http://modxcms.com/forums/index.php?topic=9276.msg170175#msg170175) is solved. Something on the server (I don’t know what, hurray for shared hosting) is changing certain code (only in the mySQL DB) with (anti-spam-XXXXXXXXX) (where the X’es are for the original code) breaking down the parser. So I created a file for the filedownloadplugin and included that in the code.

                include_once $modx->config['base_path'] . 'assets/plugins/filedownloadplugin/filedownloadplugin.php';


                For anyone having issues with this script, please check in the manager: Reports > System Events. Every time a filedownload was attempted, a log entry appeared here citing the error.

                A ridiculously small solution, but it sure did cost me a lot of time to figure out!

                Happy MODx’ing!

                noes
                  • 3647
                  • 177 Posts
                  Can’t quite figure this out, although some posts have come close but not quite left the answer behind.

                  Using this on a 0.9.6.2 site
                  The file listing appears fine, the problem is that if you click on a link you get a 404 error.

                  The link shows like this:

                  http://mysite.com/index.php?q=83/myfile.pdf

                  Am setting the path as a TV in the template

                  Have checked that the TV is correct (and the files are listing OK)
                  Have checked the correct casing of the filename
                  Am not using FURL paths
                  Am using FURL’s in the format index.php?q= with no suffix
                  If I turn off FURL’s then the link becomes

                  http://mysite.com/index.php?id=87&d=myfile.zip

                  and it works!

                  So can anyone suggest how to change the ’/myfile.zip’ to ’&d=myfile.zip’ or how to correct for it in the snippet



                    • 29525
                    • 388 Posts
                    I"m getting 404 errors when friendly URL is on. With FURLs turned off, files will download.

                    Are there any usual suspects with 404s and this plugin?
                      www.terrybarthdesign.com
                      • 22303 MODX Staff
                      • 10,725 Posts
                      bluespark, Terry, et al.:

                      Please see older posts in this topic -- http://modxcms.com/forums/index.php/topic,9276.msg73523.html#msg73523 regarding the friendly url issues.