We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13808
    • 61 Posts
    I have just updated to 2.2.1-pl (advanced) and have a problem with uploading files of any size.

    I've tried:
    - FireFox / Chrome / IE
    - Images / PDFs / Word Docs
    - File tree / file browser
    - large files (multi-mb) / small (20kb) files
    - chmodding folders 777
    - reinstalling the 2.2.1-pl update
    (every solution I've been able to find to do with Revo in the forums)

    Nothing seems to appear in
    - the PHP error log / the MODX error log
    - the upload temp path
    - browser JS errors

    PHP is set to
    - 10M max upload file size
    - 12M max post size

    Things that work
    - Packages download and install just fine
    - able to create and chmod folders through the MODX interface
    - able to HTML link files if uploaded another way

    Any thoughts on where to look next?

    EDIT: added a PHP script to the server to do uploads and it's working perfectly so it seems it's not the normal PHP upload process at fault. [ed. note: jcurtis last edited this post 14 years, 1 month ago.]
      • 13808
      • 61 Posts
      In the end this took nothing short of a from-scratch install of 2.2.1-pl.

      I installed all the packages and then manually database-hacked my content, settings, media sources etc across from a database backup I had and moved my image/css/etc files back in.

      Seems to be working so far. Can only think it was some kind of corruption.
        • 13808
        • 61 Posts
        ...and it's gone again.

        Without having changed anything since it was working (including that I'd flushed sessions and logged out and in before testing it working) it's now not working again.

        Anyone have any thoughts on where to begin looking for a solution?
          • 13808
          • 61 Posts
          I'm still having this same upload issue and with the same absence of any error/log symptoms. I'm currently running 2.2.4-pl recently and nothing has changed in the three months since I last posted.

          Anyone have any wisdom on how I could go about debugging what's wrong here?
            • 3749
            • 24,544 Posts
            The only things that come to mind are a server with no room, a missing of fouled up temp directory or temp directory path, or a JS conflict with the upload progress bar.

            Did you try turning off the compress_js and compress_css System Settings in MODX? That could be another cause.



            ------------------------------------------------------------------------------------------
            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
              • 13808
              • 61 Posts
              Thanks for checking in and sharing your thoughts Bob.

              Had a look through that list:

              - don't think it's a server with no room - able to upload via CPanel just fine

              - if I can successfully use a normal PHP upload form on the server, would that rule out the temp directory or does MODX have its own settings? (I see nothing in System Settings or )

              - is there a way I could test for the JS conflict? I've watched the Firefox Web Developer Toolbar Console and nothing springs up in the error pane during a page load or file upload.

              - I've just tried turning off JS and CSS compression (bit embarrassed I didn't think to try that). Did a cache flush and session flush and cleared the browser cache and upload still looks like it's working but with no file upload result - same behaviour.

              Anyone happen to know if this is a custom MODX upload module or if it's code being used from somewhere else? Just wondering if I can grab a copy of something close to set up on the server and do further testing/trouble shooting with.

              Thanks again Bob!
                • 13808
                • 61 Posts
                I've just tested and creation of folders and files works through the file interface and all the ownerships and permissions check out the same as the ones uploaded through CPanel.
                  • 3749
                  • 24,544 Posts
                  Have you checked the upload_files System Setting and its relatives. Go to System -> System Settings and put 'upload' (without the quotes) in the search box at the upper right. The extensions might be case-sensitive (not sure), which could explain your problem.


                  Have you tried the FileuUpload snippet?


                  I forgot to ask how you're trying to upload the files when it fails -- right-click in the Manager File tree?


                  ------------------------------------------------------------------------------------------
                  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
                    • 13808
                    • 61 Posts
                    Just a quick update - I had checked upload system settings and it's not that.

                    The ISP the site is hosted on is taking a look at the moment because they've noticed problems with sites uploading via scripts to machines in that data centre.

                    I hadn't tried the FileUpload snippet - that's my next step if the host doesn't turn anything up.
                      • 13808
                      • 61 Posts
                      I've just installed and tried to run FileUpload - for what it's worth, I'm met with the following:
                      Fatal error: Cannot redeclare seterror() (previously declared in /[path]/includes/elements/modsnippet/60.include.cache.php:158) in /[path]/includes/elements/modsnippet/60.include.cache.php on line 158
                      Let me know if you'd like any more information such as other extras installed or error log info.

                      I commented that function out and tried to upload again. I was met with a couple of errors: very interesting:
                      NewTimes-July2012.jpg is larger thant the allowed FileUpload limit: 10,485,760 bytes.
                      Assembly2012.jpg is larger thant the allowed FileUpload limit: 10,485,760 bytes.
                      The thing is that the two files I was trying to upload were 64kb and 82kb respectively.

                      Is it possible that removing the setError function may result in that being reported incorrectly or is this one to report to my ISP? (For the record, the files aren't where they should have been uploaded).