I am using the tag for uploading multiple files with php. I notice that if i choose more than 20 files php uploads only the first 20 files.Is there a way to expand this limit?
The default PHP values are 2 MB for upload_max_filesize, and 8 MB for post_max_size.
By default, PHP has a limit set to 50 MB (megabytes) for uploading through PHP scripts on our servers. If you need a higher limit, you can usually change that through the php. ini file.
This limit was added in PHP 5.3.1, to avoid a type of DOS attack: temporary files exhaustion.
Added "max_file_uploads" INI directive, which can be set to limit the number of file uploads per-request to 20 by default, to prevent possible DOS via temporary file exhaustion. (Ilia)
(changelog for PHP 5.3.1)
You can increase this limit by changing the max_file_uploads
directive.
The size of total upload is limited and not the number of files. You can change the total size by editing this line in php.ini
:
post_max_size = 256M
Or more. So, if you want to upload 50 files, each of 100 MB, then you should set this limit more than 5000 MB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With