Take the 2-minute tour ×

I'm using nginx on the frontend as "proxy cache" and apache on the backend, i've set my PHP settings to the following:

error_log = /var/www/site1/php_error.log
error_reporting = 22527
file_uploads = On
log_errors = On
max_execution_time = 0
max_file_uploads = 20
max_input_time = -1
memory_limit = 512M
post_max_size = 0
upload_max_filesize = 1000M

What's the problem? Uploading files less than 1MB is successful but anything greater than that, Google Chrome outputs:


I already checked for the error log file but it doesn't exist in the directory. I also checked /var/log/httpd/error_log but no uploading related problems. I don't know anything else which might have caused the problem so I have reached out for your helping hand. Thanks!

share|improve this question
Did you mean greater than 1GB? Take a look at your question's title! –  Ilia Rostovtsev Apr 16 at 20:34
uh... I meant what I meant. –  Pineapple Under the Sea Apr 17 at 1:07
hmm.. alright, sorry. You just had setup PHP upload_max_filesize = 1000M and I wouldn't think that 1MB uploads could ever fail! Just wanted to double-check. –  Ilia Rostovtsev Apr 17 at 6:27

2 Answers 2

up vote 6 down vote accepted

I discovered the problem, The problem was with

http {
    client_max_body_size 0;

I set client_max_body_size to 0. the default was 1M.

share|improve this answer
Thanks. Small explanaition : in the doc of nginx it's said "If the stated content length is greater than this size, then the client receives the HTTP error code 413 ("Request Entity Too Large"). It should be noted that web browsers do not usually know how to properly display such an HTTP error." wiki.nginx.org/HttpCoreModule That's why, probably, the error message is not precise. –  Fedir Sep 5 '12 at 10:01
I might be late to the party but is there something similar that would work for Apache? –  henrywright Apr 30 at 16:37

Why is post_max_size = 0 ?

It should be at least 1000M in your case, since most uploads are POST requests.

share|improve this answer
isn't it that 0 is unlimited? –  Pineapple Under the Sea Jun 24 '12 at 7:57

Your Answer


