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

    Using the Upload Files dialog (be it from the "Files" tab or via the "chain" icon dialog in TinyMCE), smaller files upload fine. Larger files (in my case about 600K or larger) fail silently. The "OK" result shows, but the file does not end up in the directory.

    BACKGROUND


    • Tried in several different old and new browsers, no difference
    • [Small(er) files upload successfully into the same directory
    • PHP configs shouldn't be interfering, I checked. See list below.
    • A 2.25MB PDF is uploading in about 8 or 10 seconds, so I'm not timing out
    • Permissions on the destination directory are 755
    • I threw together a quick and dirty file upload script to see if I could isolate to a server problem. Same file that fails in manager uploads fine.
    • Watched HTTP headers on upload; server is returning a 200. See below.

    Related HTTP Headers from 2.25MB File Upload that Fails
    (Don't tease me smiley; yes, I know this is an obsolete browser, I was trying with old and new browsers alike and this is the header capture I saved to disk. Failure happens in new FF, Chrome, etc. too).

    POST /preview/connectors/browser/file.php HTTP/1.1
    Host: www.mydomainname.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-US,en;q=0.9,en-gb;q=0.8,es-ES;q=0.6,es;q=0.5,ja-JP;q=0.4,ja;q=0.3,es-mx;q=0.1
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Referer: http://www.mydomainname.com/preview/manager/
    Cookie: PHPSESSID=c5poa2qf745486i3kn6h0jna31; __utma=5880992.1552118652.1335207001.1336324725.1336328838.9; __utmz=5880992.1335207001.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __unam=c9289eb-13722cf43b1-247e8857-19
    Content-Type: multipart/form-data; boundary=---------------------------14989327023195
    Content-Length: 2306230
    -----------------------------14989327023195
    Content-Disposition: form-data; name="file"; filename="sample.pdf"
    Content-Type: application/pdf
    
    %PDF-1.4
    %âãÏÓ
    131 0 obj
    <</Linearized 1/L 2305474/O 133/E 126090/N 26/T 2302806/H [ 636 540]>>
    endobj
              
    xref
    131 17
    0000000016 00000 n
    0000001176 00000 n
    0000001261 00000 n
    0000001438 00000 n
    0000001620 00000 n
    0000001657 00000 n
    0000001980 00000 n
    0000002058 00000 n
    0000002498 00000 n
    0000002551 00000 n
    0000002832 00000 n
    0000002908 00000 n
    0000005602 00000 n
    0000006559 00000 n
    0000014727 00000 n
    0000110362 00000 n
    0000000636 00000 n
    trailer
    <</Size 148/Prev 2302794/Root 132 0 R/Info 130 0 R/ID[<814A5EEF45762FAD93DE439C75EB1A52><D79E735E7F906749989DD997F4D6C481>]>>
    startxref
    0
    %%EOF
           
    147 0 obj
    <</Length 451/Filter/FlateDecode/I 761/L 745/S 659>>stream
    xÚb```f``ºÈÀÂÀÀ¢Ä Ä€
    HTTP/1.1 200 OK
    Date: Mon, 07 May 2012 13:24:38 GMT
    Server: Apache
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Set-Cookie: PHPSESSID=c5poa2qf745486i3kn6h0jna31; path=/preview/
    Vary: Accept-Encoding
    Content-Encoding: gzip
    X-Robots-Tag: noindex, nofollow, noarchive
    Content-Length: 77
    Keep-Alive: timeout=10, max=30
    Connection: Keep-Alive
    Content-Type: text/html
    


    Related php.ini Settings

    upload_max_filesize: 10M
    max_input_time: 60
    max_execution_time: 30
    post_max_size: 10M
    session.gc_maxlifetime: 1440
    max_file_uploads: 20
    



    Environment

    OS: linux 2.6.32-20120131.55.1.bh6.x86_64
    Web server: Apache 2.2.22
    PHP 5.2.17
    DB: MySQL: 5.1.61-community-log
    Revolution 2.2.2-pl (advanced) - core outside of document_root [ed. note: clareoconsulting last edited this post 14 years, 4 months ago.]
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Have you tried increasing the execution time to 60 or 120 seconds? Perhaps bump up the max input time too?
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 36816
        • 109 Posts
        Hi AMDbuilder,

        I didn't up the times, as the upload process completed in 8 seconds by my watch - well under the times in php.ini so I'd be quite surprised if that was the cause.

        Also, my quick and dirty upload script did the same file upload into the same directory in the same number of seconds (again on my watch) with success.

        And... not on the same box, but on the same host with the same environment, Evo uploads of similarly-sized files are working over the same Internet connection.

        What would be nice is to find a way to know what's happening when the upload completes with a failure. The silent (as far as I can see) failure is making it hard to diagnose.
          • 34231
          • 5 Posts
          I've got this issue too (uploads 1 MB fails, a few KB success). Because of that I've upgraded my MODx to Revo 2.2.2-pl. After upgrade, I'm getting the same result.

          Maybe it's relevant, maybe it isn't, but my Error Log inside MODx tells me the following on each action in de Manager:
          "Unknown column 'modActionDom.rank' in 'field list'"
            • 34231
            • 5 Posts
            After a few hours of research I couldn't find any errors. But...

            I found a key in the System Settings called upload_maxsize. This setting has a default value of 1048576 which represents 1024 bytes * 1024 = 1 Megabyte. I found out all my uploads that succeed are smaller then 1 MB. The one upload which is failing exceeds 1 MB by a few bytes.

            As topic starter clareoconsulting stated, there is no error or warning reported at any time. Maybe development could build a check which reports uploads exceeding the System Setting upload_maxsize.

            Note: I'm talking about the MODx System Setting. Not a php.ini of webserver setting!
              • 36816
              • 109 Posts
              Oh, good grief! Thank you so much for finding that. I've been through the entire system settings list, but missed this in there.

              I'm going to mark this solved, but add in an enhancement suggestion in the tracker that either (or both) the upload dialog display the maximum upload size from the setting, or at least provide an error message for overlarge file uploads.

              Thanks a bunch acropia.