Reply to Huge files

Huge files new!
by Bruce, 16 years, 8 months ago
1. There is a bug in the upload.php demo/test program. It will fail if you try to upload a huge file - like over 8MB. The $_FILE variable is empty, and causes several runtime errors - the first in the call to instantiate the object.

2. So what is with the file size limit thing anyway? My phpinfo() result says there is a 2MB limit, and indeed, a 3MB file will produce the right error. If I try any file between 2MB and 8MB, things work as one would expect (thank god for local development servers to check big files quickly!), but on my configuration (pretty standard Ubuntu server), once the file goes above 8MB, I get an entirely different error. First, the $FILE is empty, and second, there's a runtime warning that the 8MB limit has been exceeded. I don't know where that limit gets set, and why it is different than the 2MB limit reproted by phpinfo().

3. Given that, is there a good JavaScript solution that can check the true filesize limit client side so the user doesn't upload a 2+MB file, and then get the error message?Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important