【问题标题】:I am getting the error below when i try to upload files in laravel 5.4 [duplicate]当我尝试在 laravel 5.4 中上传文件时出现以下错误 [重复]
【发布时间】:2018-08-31 14:14:15
【问题描述】:

POST Content-Length of 17663771 bytes exceeds the limit of 8388608 bytes

我已经更改了我的 php.ini 文件并重新启动了我的 wamp 服务器,但仍然收到相同的错误消息。

【问题讨论】:

  • 您在 php.ini 中做了哪些更改。你需要同时设置upload_max_filesize = 25M post_max_size = 25M
  • nginx 本身对 POST、请求和文件的大小也有限制。继续检查这些设置。您的限制似乎是 8388608 bytes8 MB,但您尝试上传更大的文件(约 16.8 MB)。
  • 确保编辑正确的 php.ini 文件 - 而不是 CLI 文件。然后重启你的服务器
  • @srp 我已经设置好了....
  • @TobiasF。是的,我正在尝试上传 16 MB 的文件,我在哪里检查 nginx?

标签: php laravel


【解决方案1】:

1)确保您更改了正确的 php.ini

2) 在 php.ini 中设置两个参数

 upload_max_filesize = 25M 
 post_max_size = 25M

3) 重启Web服务器(apache、nginx等)

【讨论】:

猜你喜欢
  • 2011-06-02
  • 1970-01-01
  • 1970-01-01
  • 2011-07-12
  • 2017-09-03
  • 1970-01-01
  • 1970-01-01
  • 2019-09-26
  • 1970-01-01
相关资源
最近更新 更多