Large file upload with PHP and NGINX

When trying to upload large files with PHP in an environment which also includes nginx, apart from the php.ini directives of ‘upload_max_filesize’ and ‘post_max_size’, you also need to increase the value of ‘client_max_body_size’ in nginx.conf . See this link for explanation: http://wiki.nginx.org/HttpCoreModule#client_max_body_size

If you are still facing problems, it might be related to max execution time variables which are present across php.ini, php-fpm.conf and nginx.conf. This page has couple of them listed out: http://www.villescorner.com/2012/02/nginx-php-fpm-file-upload-battle.html

Amitabh

Advertisement