0

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 = 200M post_max_size=200M"

I even increased client_max_body_size in nginx.conf file.

but on every file upload even less than 1mb, i get max size exceed! any ideas please

ms000
  • 31
  • 1
  • 4
  • Have you modified the FcgidMaxRequestLen variable as recommended by this post: http://forum.ispsystem.com/en/showpost.php?s=491a54e065a6420661a7a6d95557b6ee&p=6611&postcount=2 – austinian Jul 07 '15 at 22:19
  • I added that like this fastcgi_param FcgidMaxRequestLen 1073741824 ; but still i have errors! i also changed fastcgi_pass from 127.0.0.1:9000 into fastcgi_pass unix:/var/run/php5-fpm.sock; but still same error – ms000 Jul 07 '15 at 23:21

2 Answers2

3

Finally i found the solution.

The problem was about Fastcgi_param in nginx.conf file.

it was about a \n between two PHP_VALUE and the right expression is like this:

fastcgi_param PHP_VALUE "upload_max_filesize = 200M \n post_max_size=200M"
ms000
  • 31
  • 1
  • 4
0

You should check client_max_body_size in your http, server or location block in nginx config (or relevant vhost config).

You can set a new value for ex. 200MB:

client_max_body_size 200M;

Check also the Nginx documentation at http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

deagh
  • 2,019
  • 5
  • 19
  • 19