PHP: POST Content-Length of xxx bytes exceeds the limit of 8388608 bytes

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

Users uploaded four attachments, each less than 5m, but the total size was more than 15m

The following error message was found in the nginx log, but it has not yet reached the laravel log level

2018/08/13 10:14:38 [error] 8326#8326: *11432788 FastCGI sent in stderr: “PHP message: PHP Warning: POST Content-Length of 14424838 bytes exceeds the limit of 8388608 bytes in Unknown on line 0” while reading response header from upstream

Solution: modify php.ini

upload_ max_ Filesize is used to limit the size of flyer files on users

post_ max_ Size is used to limit the size of the post request body

Therefore, if users upload multiple attachments at the same time, they need to set post_ max_ Size is upload_ max_ The file size is n times larger

Reference

https://stackoverflow.com/questions/11719495/php-warning-post-content-length-of-8978294-bytes-exceeds-the-limit-of-8388608-b

Similar Posts: