上传小文件没事,当文件较大时,就失败了。
改php.ini中
upload_max_filesize = 200M
重启fpm,无效
看errorlog,发现nginx报了这么一条a client request body is buffered to a temporary file
于是改nginx.conf
client_max_body_size 30m;
client_body_buffer_size 20m;
重启nginx,依然无效
再看errorlog,发现php还报了这么一条
PHP Warning: POST Content-Length of 13104266 bytes exceeds the limit of
于是继续改php.ini
POST_MAX_SIZE设为20M
重启fpm
解决