Uploading a big file with the HTML form doesn't work

When you have an HTML form with one or more file uploads, there is a limitation on the file size imposed by the web server, to avoid large or very large files to be uploaded.

This limitation is not imposed by the script. In the webserver and the scripting language that impose this limitation (but some ISP and webhosting providers always find the easy way to blame the scripts :-)

If you're using PHP, there is an easy way to determine which is the maximum file size that your PHP configuration allows for uploads:

- Create a text file with the following lines:

<?
phpinfo();
?>

- Save your file with a name like "phpinfo.php" and upload it to your webserver

- Execute that file from your browser

You'll see in your browser all the configuration parameters for your PHP install. Look for:

upload_max_filesize

that's the maximum file size allowed in your PHP server.

If your file size is lower than theĀ upload_max_filesize, then a script timeout is occuring before the file is completely upload to the web server.

In this case, look for he value:

max_execution_time

which represents the number of seconds before the script timeouts. If the file upload takes longer than that time, because a slow connection from the user side, or from your webserver, the script will abort its execution.

If you're using ASP or Perl, you must verify your webserver configuration to determine which is the maximum file size in the configuration file.