I have a php web page with 15 fields. The user will use it to upload images. I tested this by uploading 15 jpg images, each about 2 M, without any problems. On the day I
here:
max_execution_time
max_input_time
memory_limit
post_max_size
upload_max_filesize
max_file_uploads
There are bunch of PHP settings limiting the upload process:
I'd suggest reading this page: http://www.radinks.com/upload/config.php
While it's true many of these don't limit upload size, they do put a cap on the upload process - e.g. if memory limit is too low, then you'll have problems uploading big files that need to stay in memory for a little period of time.
I've seen the best solution here so far, and this is the code:
/**
* Returns the maximally uploadable file size in megabytes
*
* @return string
*/
function getMaxUploadSize()
{
$max_upload = (int)(ini_get('upload_max_filesize'));
$max_post = (int)(ini_get('post_max_size'));
$memory_limit = (int)(ini_get('memory_limit'));
return min($max_upload, $max_post, $memory_limit);
}
the php.ini directive "post_max_size" should limit how much data you can send in a single POST. if you post 15 images in one post I'm pretty sure that is still considered one POST. So it might be good to check this value before going live.
You can check in php.ini (php setting) in your localhost or hosting.
in cofiguration setting :
Yes. There are (as far as I can remember) three or so configuration settings which will affect upload size restrictions:
upload_max_filesize
is a limit on each individual file; however, post_max_size
is an upper limit on the entire request, which includes all the uploaded files.
Different hosting environments will have these values set differently, which may affect your abilities upon deployment.