We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18961 ☆ A M B ☆
    • 237 Posts
    I have a modx revo 2.2.6 install on a server and we are having file upload issues. We were uploading images o.k. but then the client wanted to upload a pdf file that was about 4 mb. So, I changed the Maximum Upload size to 10 mb. That has worked fine for me in the past. This time the file would still not upload. Also, the ability to upload any files seems to be gone. No matter how small the file is, we get an error message saying the file size is too large make sure it's below 10 mb. Which it is. I then reset the Max File Upload size back to 1 mb. Still not working. I've cleared the cache, flushed all sessions and permissions. Still won't work.

    We're running PHP 5.4.9 and mysql 5.5.28-cli

    I'm completely stumped and the client was working away filling the site with content for an end of the week launch. Now we're dead in the water.

    Any help would be appreciated.
      Michael Smull
      http://www.bigpixelstudio.com
      twitter: @mdsdesign
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Is it possible this is an issue with ModSecurity (see http://rtfm.modx.com/display/revolution20/Installation+on+a+server+running+ModSecurity)
      ?

      I've had issues that cropped up there due to restrictions it put on payloads and file sizes. It uses a different log than PHP.

      Also, double-check your PHP file upload limits -- the MODX system setting is downstream of all the php.ini stuff.

      Anything change on the site or server? Have you triple checked your permissions?
        • 18961 ☆ A M B ☆
        • 237 Posts
        I've checked the permissions. That's all good. I'll look into the other items you pointed out. Thanks!
          Michael Smull
          http://www.bigpixelstudio.com
          twitter: @mdsdesign
          • 9207 ☆ A M B ☆
          • 2,475 Posts
          It can also be a good test to make a little PHP script or Snippet and test its ability to create/write files in the directories in question...
            • 23491 ☆ A M B ☆
            • 1,056 Posts
            Quote from: mdsdesign at Feb 04, 2013, 04:31 PM
            I then reset the Max File Upload size back to 1 mb. Still not working. I've cleared the cache, flushed all sessions and permissions. Still won't work.

            upload_maxsize must be entered in bytes. To confirm, did you enter "4194304" (~4Mb) or "1048576" (~1Mb) when you attempted to change it back?

            I could see that as a possible (and easy) oversight, where you might have accidentally set it to "1" or "1024", in which case almost any file would be larger smiley

            Worth a double-check??

            Also, I'm not sure if the Gallery component conforms to the upload_maxsize setting, but if not (and it is installed) you could try to upload a test large image file into Gallery and see if that way works. If so, you may be able to quickly rule out server-side configuration issues. [ed. note: pixelchutes last edited this post 13 years, 7 months ago.]
              Mike Reid - www.pixelchutes.com
              MODx Ambassador / Contributor
              [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
              ________________________________
              Where every pixel matters.
              • 18961 ☆ A M B ☆
              • 237 Posts
              Yep, I entered in bytes. Just shortened it for the post. I should have clarified.
                Michael Smull
                http://www.bigpixelstudio.com
                twitter: @mdsdesign
                • 36996
                • 211 Posts
                I had a similar problem, the limit in my case was caused by the fastcgi config file (FcgidMaxRequestLen).
                  • 38290
                  • 712 Posts
                  Sounds like it could be a host related issue being discovered through MODX. Have you tried out a library like plupload? You can upload their examples, see if they work

                  http://www.plupload.com/
                    jpdevries
                    • 37105
                    • 194 Posts
                    You mentioned changing the upload_max_filesize to 10Mb. Did you also change the post_max_size to 10Mb in your php.ini? Also you can add php_value upload_max_filesize en php_value post_max_size in your .htaccess file to overrule other settings.
                      Codeplaza Webdesign: for professional websites at low cost