Re: Increase maximum size of an uploaded file to 50Mbyte
| From: | Yasuo Ohgaki | Date: | Sat, 10 Sep 2022 09:31:20 +0000 |
| Subject: | Re: Increase maximum size of an uploaded file to 50Mbyte | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118592@lists.php.net to get a copy of this message | ||
2022年9月7日(水) 22:58 Misha <mishanon@gmail.com>:
> Hello everyone,
>
> We spend a lot of time to increase limits for uploads file in PHP. Can we
> increase it in php.ini?
>
> Current value is 2Mb. Its so small value, when photo image can take 8Mb on
> iPhone X.
> We should increase it to 50Mb, because DevOps engineers do useless work
> trying to change it.
>
> I have prepared PR for it
> https://github.com/php/php-src/pull/9315
>
> Take a look and approve it please.
>
> Thanks!
>
> --
> Best regards, Michail
>
I can understand the motivation, but I am against the change.
To increase uploaded file max size, POST max size must be increased too.
For 99.99% entry points do not need 50MB POST max size.
and larger POST max size increases DoS risks.
Default upload file max size and POST max size should be small enough value
for better security.
IMHO, PHP script that handles large POST data should increase these
settings.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net