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

  • Have you modified the FcgidMaxRequestLen variable as recommended by this post: forum.ispsystem.com/en/… – austinian Jul 7 '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 7 '15 at 23:21
1

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"
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

  • I did that too. my problem is i cant upload any file even a 1 kilobyte one! – ms000 Jul 7 '15 at 20:43
  • I also have these send_timeout 300s; client_body_buffer_size 128K; client_body_in_file_only clean; – ms000 Jul 7 '15 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.