Support the ongoing development of Laravel.io →
Authentication Forms Validation

I'm using Laravel: 5.2.* as my project and trying to validate/restrict large size(max:600kb) image(Single file) with form uploader.

While submit form with large size image(i.e. 8 MB), redirect me on home page without performing validation OR exception message. So I checked at log-viwer and found some thing exception

'Illuminate\Session\TokenMismatchException'.

I tried number of solution, some of the listed below

Further forms, route, request and all other stuffs are working fine with small size so I think not an issue with code. Also I changed php.ini as per require and restart the apache but getting hard luck.

Current php.ini

upload_max_filesize = 1G
post_max_size = 2G

Loaded Configuration File(php.ini path)

/etc/php5/apache2/php.ini

My problem is why large size image not work as small size for my project? Please help me.
P.S. I appreciate your help/assistance.

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

saurabhd saurabhd Joined 25 Jan 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.