用户上传了 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. java中BorderLayout的使用方法

    相关设置: 使用BorderLayout布局上下左右中布局5个按键,单击中间的那个按键时就关闭窗口 代码: /**** *java中BorderLayout的使用方法 * 使用BorderLayout ...

  2. GO语言的进阶之路-goroutine(并发)

    GO语言的进阶之路-goroutine(并发) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 有人把Go比作21世纪的C 语言,第一是因为 Go语言设计简单,第二,21世纪最重要的 ...

  3. AWT和Swing的关系

    1.AWT和Swing都是java中的包. 2.AWT(Abstract Window Toolkit):抽象窗口工具包,早期编写图形界面应用程序的包,AWT是通过调用操作系统的native方法实现的 ...

  4. java抽象类与接口回顾

    1.抽象类中可以包括成员变量,方法,构造器,初始化块,内部类(接口/枚举)五种成分.2.让A类中包含B方法,又不提供B方法的实现,即抽象方法只有方法签名,没有方法体.3.有抽象方法的类只能被定义成抽象 ...

  5. VMware WorkStation9.0 安装centos-6.4

    1,设置虚拟机内存为8G时,启动报内存不足错误: Not enough physical memory is available to power on this virtual machine 解决 ...

  6. Lamport Logical Clock 学习

    1,导论 ①如何在分布式环境下定义系统中所有事件的发生顺序?②分布式环境下多个进程竞争资源时如何互斥?③什么是偏序,偏序的作用是什么,有什么不足?④什么是全序,全序的作用是什么,有什么不足?⑤为什么需 ...

  7. jquery 兼容的滚轮事件

    // jquery 兼容的滚轮事件 $(document).on("mousewheel DOMMouseScroll", function (e) { ? : -)) || // ...

  8. luogu P1979 [NOIP2013] 华容道

    传送门 这道题中,棋子的移动是要移动到空格上去,所以空格要在棋子旁边才能移动棋子;而棋子移动的方向由空格决定 所以我们可以记三维状态\(di_{i,j,k}\),表示状态为棋子在\((i,j)\),空 ...

  9. [ZJOI2012]波浪弱化版(带技巧的DP)

    题面 \(solution:\) 这道确实挺难的,情况特别多,而且考场上都没想到如何设置状态.感觉怎么设状态不能很好的表示当前情况并转移,考后发现是对全排列的构造方式不熟而导致的,而这一题的状态也是根 ...

  10. spfa算法----最短路

    题目链接:https://cn.vjudge.net/contest/66569#problem/A 代码: vis数组代表是否还有用,首先初始化为0,首先第一个点入队列,标记为1,然后刚入队列的时候 ...