简体   繁体   English

Laravel 5.4中的ValidatePostSize错误

[英]ValidatePostSize error in laravel 5.4

I keep receiving this error whenever I try to post a form in a Laravel 5 app. 每当我尝试在Laravel 5应用程序中发布表单时,我都会不断收到此错误。

ValidatePostSize.php (line 27)↵at ValidatePostSize->handle(object(Request), object(Closure))in Pipeline.php (line 148)↵at Pipeline->Illuminate\\Pipeline{closure}(object(Request))in Pipeline.php (line 53)↵at Pipeline->Illuminate\\Routing{closure}(object(Request))in CheckForMaintenanceMode.php (line 46)↵at CheckForMaintenanceMode->handle(object(Request), object(Closure))in Pipeline.php (line 148)↵at Pipeline->Illuminate\\Pipeline{closure}(object(Request))in Pipeline.php (line 53)↵at Pipeline->Illuminate\\Routing{closure}(object(Request))in Pipeline.php (line 102)↵at Pipeline->then(object(Closure))in Kernel.php (line 151)↵at Kernel->sendRequestThroughRouter(object(Request))in Kernel.php (line 116)↵at Kernel->handle(object(Request))in index.php (line 54)↵↵↵ ValidatePostSize.php(第27行)-位于Pipeline.php(第148行)中的ValidatePostSize-> handle(object(Request),object(Closure))-位于Pipeline-> Illuminate \\ Pipeline {closure}(Object(Request))中Pipeline.php(第53行)↵位于Pipeline-> Illuminate \\ Routing {closure}(object(Request))在CheckForMaintenanceMode.php(第46行)↵在CheckForMaintenanceMode-> handle(object(Request),object(Closure))在在Pipeline-> Illuminate \\ Pipeline {closure}(对象(请求))中的Pipeline.php(第148行)-在Pipeline-> Illuminate \\ Routing {closure}(对象(请求))中的Pipeline.php(第53行) Pipeline.php(第102行)↵at管道-> then(object(Closure))在Kernel.php(第151行)↵atKernel-> sendRequestThroughRouter(object(Request))在Kernel.php(第116行)↵atKernel -> index.php中的handle(object(Request))(第54行)↵↵↵

I tried adding these lines in .htaccess according to this answer: 我尝试根据答案在.htaccess中添加这些行:

php_value post_max_size=15M 
php_value upload_max_filesize=15M

I also commented out these lines according to this answer 我也根据答案注释了这些行

public function handle($request, Closure $next)
    {
//        if ($request->server('CONTENT_LENGTH') > $this->getPostMaxSize()) {
//            throw new PostTooLargeException;
//        }

        return $next($request);
   }

Finally, you can see the form I'm trying to post at this link where you can see the error in dev tools: 最后,您可以在此链接中看到我要发布的表单,您可以在其中看到开发工具中的错误:

https://www.paygizer.com/gold https://www.paygizer.com/gold

How can I kill size validation on this form? 如何取消此表单上的尺寸验证?

不确定,但是更改.htaccess / php.ini / httpd.conf后,我将尝试重新启动apache

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM