On Sat, 10 Sept 2022 at 11:32, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
>
> 2022年9月7日(水) 22:58 Misha <misha...@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
> yohg...@ohgaki.net

If I'm not mistaken, even the memory_limit needs to be increased when
the post_max_size directive is larger. The memory_limit needs to be
larger than post_max_size. And the post_max_size must be slightly
larger than upload_max_size.

memory_limit > post_max_size > upload_max_size

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to