PHP: POST Content-Length of xxx bytes exceeds the limit of 8388608 bytes【转】
PHP The of post xxx content limit length
2023-09-27 14:25:31 时间
用户上传了 4 个附件,每个小于 5M,但是总大小超过了 15 M。
在 Nginx 日志中找到了如下错误信息,还没有到 Laravel 日志那一层。
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
解决方法,修改 php.ini
upload_max_filesize 用于限制用户上传单文件的大小
post_max_size 用于限制 POST 请求 body 的大小
所以,如果用户会同时上传多个附件,就需要设置 post_max_size 为 upload_max_filesize 的 N 倍大。
相关文章
- PHP 多态理解
- PHP计算代码执行消耗时间
- java php 3des实现
- PHP全栈学习笔记9
- PHP 数组辅助函数
- Nginx 笔记与总结(11)Nginx + php-fpm + MySQL 安装 ecshop
- PHP代码审计----2、文件包含
- 《PHP和MySQL Web开发从新手到高手(第5版)》一一2.10 让PHP进行输入
- 《PHP和MySQL Web开发从新手到高手(第5版)》一1.2 在Windows下安装
- [转]PHP开发中涉及到emoji表情的三种处理方法
- php根据命令行参数生成配置文件
- php设计模式-单例模式
- php curl Problem with the SSL CA cert (path access rights)
- php连接mysql8.0报错,Server sent charset unknown to the client. Please, report to the developers
- 解决 php-cgi 启动时提示缺少 msvcr110.dll 的问题
- DVWA文件上传出现Incorrect folder permissions&The PHP module GD is not installed.的解决方法
- PHP面向对象(OOP):.static和const关键字的使用(self::)