Score:2

How to increase PHP file size limits on Nginx?

in flag

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

Score:1
ua flag

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

Thaer z avatar
in flag
I've done this before and now I've tried again but it failed
in flag
@Thaerz Which context are you using it in? `http`? Try `server`.
Thaer z avatar
in flag
@Wesley Context: http, server, location
Score:0
in flag

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;
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.