My HTML form is like
<input type="hidden" name="MAX_FILE_SIZE" value="20000" />
<input type="file" name="userfile" id="userfile" size="50" />
However, when I upload a file of 3mb, it gives error that:
Problem: File exceeded max_file_size"
You may want to increase the value of the max file size.
<input type="hidden" name="MAX_FILE_SIZE" value="67108864" />
You will also need to update the php.ini file with the following values to allow up to 64MB files:
memory_limit = 96M
post_max_size = 64M
upload_max_filesize = 64M
edit the php.ini
help: http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/
Last I checked, MAX_FILE_SIZE
was in bytes. 3MB is equal to either 3,000,000 or 3,145,728 (depending on unit convention), both of which are significantly higher than the 20,000 you specified.