Skip to content

Increase maximum size of an uploaded file to 50Mbyte #9315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mishanon
Copy link

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.

@cmb69
Copy link
Member

cmb69 commented Aug 12, 2022

This won't really change anything, though. You'd need to change the actual default values.

Anyhow, I think this should first be discussed on the internals mailing list.

@juan-morales
Copy link
Contributor

Can you send this to the PHP internals list?

@mishanon
Copy link
Author

Can you send this to the PHP internals list?

Yes, I will figure out how to do it and send.

@heiglandreas
Copy link
Contributor

And remember that the post_max_size should be bigger than the upload_max_filesize...

@TimWolla
Copy link
Member

TimWolla commented Sep 7, 2022

For reference: https://externals.io/message/118570

Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted by @cmb69, please change defaults in

php-src/main/main.c

Lines 724 to 725 in f3d8f09

STD_PHP_INI_ENTRY("upload_max_filesize", "2M", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLong, upload_max_filesize, php_core_globals, core_globals)
STD_PHP_INI_ENTRY("post_max_size", "8M", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLong, post_max_size, sapi_globals_struct,sapi_globals)
as well

@bukka
Copy link
Member

bukka commented Dec 30, 2022

@mishanon It seems to me that the discussion here or on internals hasn't reached any conclusion so I think we would need an RFC for such change. Are you prepared to do that? If not, we might need to close this.

@cmb69
Copy link
Member

cmb69 commented Dec 30, 2022

See https://wiki.php.net/rfc/howto about the RFC process.

@cmb69 cmb69 added the RFC label Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants