Problem uploading bigger files (+20mb)

selective-select

Mar 27th, 2017 09:16 AM

I have a problem with a script I have bought it from codecanyon and devdojo is the creator of the script. Since he closed the support from codecanyon, I'm gonna ask here and please I NEED HELP to fix this problem .. When I upload files between 1 kb to 19 mb the process is completed, but when the file has 21 mb or 100 mb I get this error :

Whoops, looks like something went wrong.

1/1 TokenMismatchException in VerifyCsrfToken.php line 53: in VerifyCsrfToken.php line 53 at VerifyCsrfToken->handle(object(Request), object(Closure)) at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in ShareErrorsFromSession.php line 54 at ShareErrorsFromSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in StartSession.php line 62 at StartSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in EncryptCookies.php line 59 at EncryptCookies->handle(object(Request), object(Closure)) at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in CheckForMaintenanceMode.php line 42 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103 at Pipeline->then(object(Closure)) in Kernel.php line 122 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87 at Kernel->handle(object(Request)) in index.php line 54

What should I do ? Thank you !!

mark

Mar 27th, 2017 09:43 AM

That should have nothing to do with the filesize. However you can disable the token verification by commenting out the following line from app/Http/Kernel.php.

\App\Http\Middleware\VerifyCsrfToken::class,
selective-select

Mar 27th, 2017 10:21 AM

I have done what you said, but is not working.

devdojo

Mar 27th, 2017 03:20 PM

Can you check your PHP info page.

<?php

echo phpinfo();

20 mb is a typical max_file_uploads size that will need to be changed in your PHP settings:

php max file upload size

Let me know if that helps.

Thanks.

selective-select

Mar 27th, 2017 04:08 PM

Can you tell me where can I find this ? In which folder ? Thanks.

devdojo

Mar 27th, 2017 11:00 PM

This is a PHP setting that would need to be set through your hosting provider or through your cPanel. It depends on what kind of configuration you have, but typically there is a way for most server environments to change this.

You would need to contact your hosting provider and ask them where you can set this :)

selective-select

Mar 28th, 2017 02:56 AM

The hosting provider increase my memory , but still I have the problem..

devdojo

Mar 29th, 2017 09:46 PM

Can you also confirm that the post_max_size is greater than 20mb as well:

screenshot

Let me know when you get that updated and test it out :)

Thanks.

selective-select

Mar 30th, 2017 06:44 PM

Same problem..