用户上传了 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. 爬虫处理网站的bug---小于号未转化为实体符

    1.发现BUG 爬取 chinadrugtrials 详情页的公示的试验信息时候, 发现程序在某些地方跑断掉了,如下: 经排查发现,原来这是网页的bug-----极少数详情页面的某些文字中的小于号,未 ...

  2. JavaSE学习总结(三)——Java语言编程练习、格式化字符与常量

    一.变量.常量.字面量 package com.zhangguo.chapter2_3; /** * 1.银行利率为5%,问存款100美元5年的收益细节? * */ public class P1 { ...

  3. Node remains in conflict,svn冲突解决办法

    修改问价svn 提交后其他客户端svn update更新时出现以下问题 Updating '.':Skipped 'Hi3559_Stream' -- Node remains in conflict ...

  4. typealias

    类的别名

  5. Python基础(协程函数、内置函数、递归、模块和包)-day05

    写在前面 上课第五天,打卡: 凭着爱,再回首: 一.协程函数(生成器:yield的表达式形式) 1.yield 的语句形式: yield 1 - 这种方式在 Python基础(函数部分)-day04  ...

  6. 二、ARM处理器

    2.1 介绍 ARM核心的基本结构指ARM架构显示处理器中处理的数据大小.指令架构.寄存器等的结构和运行原理 ARM核心是利用ARM架构的基本原理实现的处理器核心部分. ARM的主要架构如下: ARM ...

  7. linux系统--磁盘管理命令(二)

    一.硬盘的分区模式 之前的硬盘分区模式为MBR 主分区不超过4个 单个分区容量最大为2TB 前面的分区模式就为MBR分区模式. 另一种分区模式为GPT 主分区个数限制:在GPT的分区表中最多可以支持1 ...

  8. $_SERVER 当前信息

    连接:https://www.cnblogs.com/mafeng/p/5868117.html $_SERVER['HTTP_ACCEPT_LANGUAGE']//浏览器语言 $_SERVER['R ...

  9. C语言中宏定义(#define)时do{}while(0)

    参考链接: http://www.cnblogs.com/fengc5/p/5083134.html 1.用于宏定义, 在该函数可以调用其它的宏,做其它内容的处理

  10. Ball CodeForces - 12D (线段树)

    题目链接:https://cn.vjudge.net/problem/CodeForces-12D 题目大意:给你一个人的三个信息,如果存在一个人比当前人的这三个信息都大,那么这个人就会退出,问你最终 ...