I know how files are uploaded ... or so I thought until this afternoon.

My problem is that with a large file (220MB!) I get the following error window: "Alert: Document contains no data." and the post doesn't continue (occurs as soon as I press the submit button - no page changes/reloading). This occurs even after changing the MAX_FILE_UPLOAD_SIZE in the HTML file, the post_max_size and upload_max_filesize (php.ini) to much greater than the actual file size (about 300M😎. I increased the memory_limit in php.ini to 350MB also. From my experience problems like this are typically limited to the browser - before PHP even gets a whif of the upload. Smaller files around 100 MB upload just fine under the same conditions.

Here's my question: (a) am I forgetting to change some parameter that should be staring me in the face, or (b) is there a defined maximum file size that mozilla (my browser) will upload?

Thanks!
Cameron Perry

System: RH Linux 9.
PHP 4.2.2
Apache 2.0

    sometimes a browser will timeout if it doesnt receive a response back from your site during a pageload. it could also be a socket connection getting forcefully closed which would be on a lower level than you or php, more likely apache or iis, possible the persons computer if it isnt getting ack's back during the upload.

      Hi,

      check your httpd.conf for a parameter called LimitRequestBody which limits the amount of data that can be sent in one request. Not sure, if that is the problem, because in most cases you should get a specific apache error message and not "Alert: Document contains no data.".

      Thomas

        On RH this parameter might also be in php.conf.

        Thomas

          4 days later

          Sorry I didn't reply earlier... some other, more important things came up. There is no global LIMIT-anything tag tag in the httpd.conf file, but I'm not sure that is the problem. I mean, I can still upload large files, just not my 220MB+ files. The form types are correct and the max file size tag is correct in the html.

          In regards to time-out issues, the error comes immediately upon form submission. I'm very sure PHP is set-up correctly (all the max memory and file sizes are considerably higher than the actual file size I'm trying to upload).

            Hi,

            not sure what could cause the problems.

            It might help if you post httpd.conf, php.conf and php.ini in a zip file if they don't contain any confidential data.

            Also post the piece of code that contains the form.

            Thomas

              Originally posted by tsinka
              On RH this parameter might also be in php.conf.

              Thomas

              Thomas, you're a genious! I must have looked at your post yesterday afternoon and thought the php.conf was you combining httpd.conf with php.ini in a brain fog. Any case, things were made clear by your post later in the night - I was just being stupid. I totally forgot this file even existed... thanks!

              LimitRequestBody is in the php.conf . I set it from 100MB to 300MB and everything works as expected.

              Thanks again!
              Cameron

                Write a Reply...