PHP: Set max_file_uploads for one file rather than php.ini
Posted
by Jenkz
on Stack Overflow
See other posts from Stack Overflow
or by Jenkz
Published on 2010-03-22T12:42:50Z
Indexed on
2010/03/22
12:51 UTC
Read the original article
Hit count: 588
Like many variables in PHP using ini_set() on a page doesn't actually work.
I've recently upgraded my PHP version and found that my multiple image uploader is now capped. After 3 hours of frustration, I've found that my new PHP install has the new "max_file_uploads" parameter set to "20".
So only the first 7 images get uploaded (each is in three sizes, 7*3=21).
I can now change my php.ini value of "max_file_uploads" to 300, but I'd rather not do that side wide.
Is there any way to set that value just for a single file (upload.php)? Could a .htaccess file be used for this?
© Stack Overflow or respective owner