前言
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

