I am trying to upload a file from Knowledge Tree interface but for some odd reason it's displaying the following error message:

The uploaded file is larger than the PHP upload_max_filesize setting

Currently I have it set to -1 but it still won't upload the file successfully.

What needs to be done apart from changing the php.ini-dist and .htaccess properties?

1 Answer 1


php.ini-dist isn't in use. You have to copy it to php.ini and then make modifications.

Also, are you really sure that you want unlimited file upload size?


There are other variables that also controls how uploads (and PHP scripts in general) works:

upload_max_filesize > post_max_size > memory_limit

In human words: memory_limit must be larger than post_max_size, and post_max_size must be larger than upload_max_filesize.

  • Hi Pauska, thanks for your feedback. I have copied php.ini-dist just as a backup and renamed the file to php.ini. Modifications were already made previously. This was to no avail as it's still not allowing me to upload a 7.30MB zipped file. Do you have any idea what might be wrong? Regarding the unlimited file upload size, that is just temporary. I will change it to 20M once this works!
    – user95673
    Sep 23, 2011 at 12:37
  • See my updated answer
    – pauska
    Sep 23, 2011 at 12:48
  • hey pauska.. many thanks for your help.. i was using the php.ini-dist, that was the problem, then I changed it from the php.ini located in windows and it's now working :)
    – user95673
    Sep 23, 2011 at 13:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .