douyin4561 2017-07-28 23:47
浏览 221
已采纳

LARAVEL 5.4:ValidatePostSize.php中的PostTooLargeException(第24行)

I am currently developing an app with Laravel 5.4. I am using xampp and changed the php.ini, php.ini-development and php.ini-production files with the following configurations

post_max_size = 100M

upload_max_filesize = 200M

memory_limit = 128M

I restarted Apache and my laravel development server but still, I get the error

Warning: POST Content-Length of 14253688 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

PostTooLargeException in ValidatePostSize.php (line 24)

I even restarted my PC and still not working. Am I missing something here?

Thanks

  • 写回答

1条回答 默认 最新

  • duanjia9577 2017-07-28 23:50
    关注

    You should read settings description prior changing it, because what you currently have makes little sense. File uploads goes via POST request, so value of upload_max_filesize must not be greater than post_max_size and you got opposite.

    Another thing is, and this happens quite often, that you might have play with wrong php.ini file - this could be the reason why definitely smaller file than your limits cannot go thru. Also check if you by any chance do not have some settings overridden in i.e. virtualhost settings of your httpd. In general do phpinfo() and check if what it shows, matches with what you have edited (incl. certain parameters).

    Restarting PC is rather pointless. All you need to restart is usually httpd only, yet sometimes you need to shut httpd down and start it again, not just tell it to reload (however PC restart enforces that cycle nonetheless, yet it's unnecessary to go to that extreme).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值