-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Respect user settings in php.ini if they are big enough #32216
Conversation
This fixes #32209 |
Thanks for your PR! can you please solve DCO (see https://github.com/nextcloud/server/pull/32216/checks?check_run_id=6223623697)? Thank you! |
In the admin guide: * https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html it is mentioned that you can tweek: * max_input_time * max_execution_time in order to enable larger file uploads. However, the current codebase will hard code these values to one hour, no matter what the user sets in php.ini. This patch will allow the user to set these settings in php.ini and they will be respected, if and only if, they are set to something bigger than 3600 seconds. Signed-off-by: Micke Nordin <kano@sunet.se>
Sure, fixed. |
Co-authored-by: Louis <6653109+artonge@users.noreply.github.com> Signed-off-by: Micke Nordin <kano@sunet.se>
Thanks for sending a pull request 👍 The above code should work and allow an administrator to pick a higher value. I think the actual issue here is that we configure Also keep in mind that almost every request is executing this code. It's already bad to have the ini_set calls (with suppress operator) here. If we merge this patch we check on each time if there is a higher limit and if not run the ini_set call. I don't think that removing those calls will improve the performance yet it's still bad. |
For shared hosting providers, it's often not possible to modify the ini files, this is probably the reason why this is done like this currently. |
For shared hosting, most of the time, both are disabled (ini files and |
I am not married to either solution, I just want to be able to change the setting and not have it hard coded, which I think is the worst solution of them all. This patch is proposed because it is backwards compatible with the old solution. I don't know if removing the hard coded value altogether will break stuff for a lot of people on shared hosting or for people who did not have to think about this untill now. I also don't think there is a lot of performance penalty with doing it this way so it shouldn't be a problem, but if you guys would rather remove the hard coded value that is fine too for me. :) |
Sure, this is a "problem" of all |
Signed-off-by: Micke Nordin <kano@sunet.se>
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
/backport to stable24 |
/backport to stable23 |
In the admin guide:
Fix #32209
it is mentioned that you can tweek:
in order to enable larger file uploads. However, the current codebase
will hard code these values to one hour, no matter what the user sets in
php.ini.
This patch will allow the user to set these settings in php.ini and they
will be respected, if and only if, they are set to something bigger than
3600 seconds.