用户上传了 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 倍大。

参考

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

PHP: POST Content-Length of xxx bytes exceeds the limit of 8388608 bytes的更多相关文章

  1. Overflow sort stage buffered data usage of 33554495 bytes exceeds internal limit of 33554432 bytes

    MongoDB执行错误: Overflow sort stage buffered data usage of 33554495 bytes exceeds internal limit of 335 ...

  2. 使用TarOutputStream出现 request to write '1024' bytes exceeds size in header错误的解决方法

    因为测试流程中,所测客户端会根据服务器A返回的response决定发送给服务器B的请求里各参数的值,所以现在需要模拟服务器的响应.而这个项目服务器A的响应式返回一个流,一个GZIP压缩格式流,压缩的是 ...

  3. The maximum string content length quota (8192) has been exceeded while reading XML data

    原文:The maximum string content length quota (8192) has been exceeded while reading XML data 问题场景:在我们W ...

  4. ics httpDELETE 时增加 content,length 特别需求

    unit: OverbyteIcsHttpProt.pasprocedure THttpCli.SendRequest(const Method, Version: String); var Head ...

  5. WCF常见异常-The maximum string content length quota (8192) has been exceeded while reading XML data

    异常信息:The maximum string content length quota (8192) has been exceeded while reading XML data 问题:调用第三 ...

  6. String Matching Content Length

    hihocoder #1059 :String Matching Content Length 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 We define the ...

  7. File attachment or query results size exceeds allowable value of 1000000 bytes.

    今天早晨,收到了作业执行失败的邮件(前几天还能正常执行该作业.不知为何今天出错) 邮件显示,作业的第三个步骤报错. step3内容: msdb.dbo.sp_send_dbmail     @prof ...

  8. 定时器setInterval, innerText获取文本, charAt()获取单个字符串, substring(1, content.length)获取范围内的字符串, 实现字符串的滚动效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D

    Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D 从数据库 ...

随机推荐

  1. 【JUC】CopyOnWriteArrayList

    写入时复制(CopyOnWrite) 什么是CopyOnWrite容器 CopyOnWrite容器即写时复制的容器.通俗的理解是当我们往一个容器添加元素的时候,不直接往当前容器添加,而是先将当前容器进 ...

  2. HDU - 4324 Triangle LOVE(拓扑排序)

    https://vjudge.net/problem/HDU-4324 题意 每组数据一个n表示n个人,接下n*n的矩阵表示这些人之间的关系,输入一定满足若A不喜欢B则B一定喜欢A,且不会出现A和B相 ...

  3. UVALive - 3266 Tian Ji -- The Horse Racing(贪心)

    题目链接 题意 两人赛马,每居获胜得200,平局无事发生,输了也输200.求最优的策略使赢的钱最多. 分析 排序,从最快的开始比,若比不过,则用最弱的消耗最强的.模拟即可. #include<i ...

  4. 流媒体技术学习笔记之(二)RTMP和HLS分发服务器nginx.conmf配置文件(解决了,只能播放RTMP流而不能够播放HLS流的原因)

    user www www; worker_processes ; error_log logs/error.log debug; #pid logs/nginx.pid; events { worke ...

  5. mysql的事件

    mysql的事件定时器的使用: SHOW VARIABLES LIKE 'event_scheduler' --查询event_scheduler开启状态 SET GLOBAL event_sched ...

  6. 15. Spring boot CRUD

    一.列表页 templates/emp/list.html 0.侧边栏链接: <li class="nav-item"> <a class="nav-l ...

  7. 20155302 2016-2017-2 《Java程序设计》第九周学习总结

    20155302 2016-2017-2 <Java程序设计>第九周学习总结 教材学习内容总结 基本数据库操作相关的JDBC接口或类是位于java.sql包中.在程序中要取得数据库联机,我 ...

  8. [C++]Linux之Ubuntu下编译C程序出现错误:“ stray ‘\302'或者'\240' in program”的解决方案

    参考文献:[error: stray ‘\240’ in program或 error: stray ‘\302’ in program](http://blog.csdn.net/u01299585 ...

  9. [JSOI2008]球形空间产生器 (高斯消元)

    [JSOI2008]球形空间产生器 \(solution:\) 非常明显的一道高斯消元.给了你n+1个球上的位置,我们知道球上任何一点到球心的距离是相等,所以我们 可以利用这一个性质.我们用n+1个球 ...

  10. 变量,id()

    >>> a = 1 >>> print id(a) 2870961640 >>> b = a >>> print id(b) 2 ...