用户上传了 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. dojo小代码

    RunSource Using event delegation on an HTML table to highlight rows and columns. ------------------- ...

  2. Curl中的参数知多少

    我们常用的curl命令,后面有好多参数,都是什么含义呢?遂记录此文以备用. Curl命令参数解释: -a/--append 上传文件时,附加到目标文件 -A/--user-agent <stri ...

  3. django中命令行调试程序

    (1)进入到程序manage.py所在的目录下 (2)python manage.py shell 这样可在命令行中引入models.views.class等所有的包,然后进行命令行试运行.

  4. javascript 值类型和引用类型

    值类型 1. 值类型:string/number/boolean/undefined: 2. 存储:值类型的数据,存储的是数据本身的变量: 3. 赋值:直接将存储的数据复制一份进行赋值,两份数据在内存 ...

  5. 自动部署tomcat,并以普通用户身份运行 for centos6

    #!/bin/bash ######## install jdk install_jdk () { rpm -e ‘rpm -qa |grep jdk’ wget \ --no-check-certi ...

  6. awk词频统计功能

    [root@test88 ~]# vim word_freq.sh #!/bin/bash if [ $# -ne 1 ];then echo "Usage: $0 filename&quo ...

  7. VUE2.0 饿了吗视频学习笔记(六):定位问题、文字显示、模糊背景图片、点击事件

    一.定位问题按照视频写代码时,发现元素“5个“”定位不对,如下图 正常位置为 还以为是哪里写错了,仔细研究了下,需要在父div上加relative. position:relative/absolut ...

  8. bean之间的继承和依赖关系

    继承Bean配置 Spring允许继承bean的配置,被继承的bean称为父bean,继承这个父Bean的Bean称为子Bean 子Bean从父Bean中继承配置,包括Bean的属性配置 子Bean可 ...

  9. IDA Pro使用技巧

    DA Pro基本简介 IDA加载完程序后,3个立即可见的窗口分别为IDA-View,Named,和消息输出窗口(output Window). IDA图形视图会有执行流,Yes箭头默认为绿色,No箭头 ...

  10. comfirm和prompt的区别

    comfirm和prompt的区别. <html> <title>测试页面</title> <head> </head> <body& ...