On Wed, Sep 7, 2022 at 2:58 PM Misha <misha...@gmail.com> wrote:

> 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 think the problem is that too high value can potentially result in DoS if
you have for example some API that might be sensitive to it. I think this
should be really handled on web server though and Apache httpd [1] as well
as nginx [2] have the default limit set to 1MB. The only problem is that
Apache introduced that limit default quite recently (2.4.53) so there are
likely still lots of users where this value matters more if they don't
tweak defaults. I guess it might be wise to do much smaller increase and
start maybe somewher closer to 8MB or maybe even wait a little bit longer
till most users have safe defaults on web server.

[1] https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestbody
[2]
http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

Regards

Jakub

Reply via email to