Joseph Morgan
1 Feb 2022
Laravel
Hello there,
I am facing this error when I try to upload image more than 1MB to my server which is running with Laravel & Nginx
What Should i do, I tried to update the php.ini & increased the values of
post_max_size
upload_max_filesize
max_execution_time
and nothing is changing the same error, please help!
It seems that the error is not from PHP this is Nginx error I suggest that you can update the client_max_body_size from the configuration file by the next steps
Like
server {
.....
client_max_body_size 64M;
}
that's all, good luck
Joseph Morgan
1 Feb 2022
Best solution, you are amazing :) Thanks
Mayur Tandan
21 Jul 2022
Hi Joseph,
I am using laravel 5.4 with PHP 7.4. Trying to upload 6 mb file after converting into base64 from from frontend angular using laravel API getting 413 error. Changed nginx conf settings set 120M also changed php.ini settings.
```
upload_max_filesize 100M;
post_max_size 100M;
memory_limit 120M;
```
still getting the same error. what could be the reason.
Mayur Tandan
22 Jul 2022
Yes, I already changed it.
Mayur Tandan
22 Jul 2022
Yes, after changing the Nginx setting restarted the Nginx server and after changing the PHP settings restarted the apache server.
© 2024 Copyrights reserved for web-brackets.com