Problem uploading bigger files (+20mb)

Posted In Laravel
  • selective-select 2 years ago
    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 !! 

    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 2 years ago
    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,
    ```

    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 2 years ago
    I have done what you said, but is not working. 

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

  • devdojo 2 years ago
    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](http://i.imgur.com/eSvi03c.png)
    
    Let me know if that helps.
    
    Thanks.

    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 2 years ago
    Can you tell me where can I find this ? In which folder  ? Thanks.

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

  • devdojo 2 years ago
    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 :)

    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 2 years ago
    The hosting provider increase my memory , but still I have the problem..  

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

  • devdojo 2 years ago
    Can you also confirm that the `post_max_size` is greater than 20mb as well:
    
    ![screenshot](http://i.imgur.com/gKHHHf6.png)
    
    Let me know when you get that updated and test it out :)
    
    Thanks.

    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 2 years ago
    Same problem.. 

    Same problem..

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
Want to create your own SAAS?

I can teach you to create your own Software as a Service. Click here to learn more!

Visit SAAS Adventure!