[PHP]修改upload_max_filesize无效的问题
前言
PHP做插件的过程中,发现上传的zip文件,大于8M的会直接中断传输,印象中我已经改过了upload_max_filesize
设置为300M了呀。
解决
修改php.ini
中的upload_max_filesize
为300M后,还要检查下:post_max_size
,这玩意儿一般会忘记,也将这个设置为300M后解决问题。
附加配置
file_uploads = On
upload_max_filesize = 300M
post_max_size=300M
max_file_uploads = 20
附加phperror.log
[13-May-2021 09:17:02] NOTICE: fpm is running, pid 1
[13-May-2021 09:17:02] NOTICE: ready to handle connections
NOTICE: PHP message: PHP Warning: POST Content-Length of 8630132 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
NOTICE: PHP message: PHP Warning: POST Content-Length of 8630132 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
NOTICE: PHP message: PHP Warning: POST Content-Length of 8630132 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
NOTICE: PHP message: PHP Warning: POST Content-Length of 8630132 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
NOTICE: PHP message: PHP Warning: POST Content-Length of 8630132 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
NOTICE: PHP message: PHP Warning: POST Content-Length of 8630132 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
[13-May-2021 09:39:11] NOTICE: Finishing ...
[13-May-2021 09:39:11] NOTICE: exiting, bye-bye!
[13-May-2021 09:39:14 UTC] PHP Warning: Module "redis" is already loaded in Unknown on line 0
[13-May-2021 09:39:14] NOTICE: fpm is running, pid 1
[13-May-2021 09:39:14] NOTICE: ready to handle connections
本文来自:[PHP]修改upload_max_filesize无效的问题-小码农,转载请保留本条链接,感谢!
温馨提示:
本文最后更新于 2021年08月17日,已超过 1,206 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我。
正文到此结束
- 本文标签: 问题 php
- 本文链接: https://djc8.cn/archives/php-modify-upload-max-the-problem-of-invalid-filesize.html
- 版权声明: 本文由小码农原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权
热门推荐
相关文章
该篇文章的评论功能已被站长关闭