johnDoe220's avatar

Illuminate\Http\Exceptions\PostTooLargeException

Hi. When I upload a file of more than one megabyte in Laravel, it gives me an error. I should add that exactly this source code works without problems in Windows, but in Linux it gives me this error. For better diagnosis, I should add that in Both operating systems use xampp software and through the php.ini file upload_max_size and post_max_size and ... I increased it and restarted the server and even Middleware I disabled validatePostSize, which gives me a 419 error. I did everything I could think of, but this problem is not solved in Ubuntu and it is still a mistake Illuminate \ Http \ Exceptions \ PostTooLargeException Gives

0 likes
2 replies
dennisprudlo's avatar
Level 7

Have you checked whether your settings were applied after the server restart? You can show your configuration using phpinfo and check if upload_max_size and post_max_size have the correct values.

Route::get('phpinfo', fn () => phpinfo());
johnDoe220's avatar

Now that I look, the sizes have not been changed and the size is 2 and 8 MB, respectively

Please or to participate in this conversation.