3

When I upload the file in phpmyadmin this problem appears 413 Request Entity Too Large my configure php.ini

post_max_size = 100M
upload_max_filesize = 100M
memory_limit = 256M

I have NGINX server with FASTCGI php-fpm 127.0.0.1:9000 which php.ini is under /etc/php5/fpm/php.ini

I increased upload_max_filesize and post_max_size in php.ini

The Fastcgi params is like this

fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M"

client_max_body_size 100M;

I restarted php-fpm and nginx, But the problem is still

2 Answers 2

2

This issue comes from nginx, in your nginx.conf set the following value:

client_max_body_size 100M;

Obviously if you want a bigger file size then 100MB, make this value higher


You can read more about client_max_body_size in the nginx documentation: http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

3
  • I've done this before and now I've tried again but it failed
    – Thaer z
    Aug 27, 2021 at 23:15
  • @Thaerz Which context are you using it in? http? Try server.
    – Wesley
    Aug 28, 2021 at 0:16
  • @Wesley Context: http, server, location
    – Thaer z
    Aug 28, 2021 at 6:19
0

Just I have change fastcgi_pass to the right source

fastcgi_pass unix:/var/php-nginx/163014821416069.sock/socket;

To

fastcgi_pass unix:/run/php-fpm/www.sock;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .