Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is reasonable to allow file uploads up to 100MB through PHP ?

I'm currently allowing 64MB, but usually my customers only need 24MB. Can we improve that ?


share|improve this question

closed as off topic by Nifle, BinaryMisfit Oct 1 '10 at 14:31

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

I assume you are talking about the php.ini directive upload_max_filesize. When you adjust this value you must also adjust post_max_size and memory_limit. The general rule is that memory_limit > post_max_size > upload_max_filesize.

The problems with allowing larger file uploads are more memory (RAM) usage, greater disk space usage, and longer lived open connections to handle the uploads. You should ensure that all are in amble supply before allowing such a drastic increase in file upload size. Consider your visitors & if they are likely to be malicious (on the internet assume everyone is from 4chan /b/) then you should make certain that your solution is robust.

I have done 100MB file uploads for a audio/video upload site without problems, but the servers were monsters.

share|improve this answer
ok so I forgot to mention that the upload functionality is available only in the websites back-end for my custoemrs and not for any client. I guess that it's ok then. – Patrick Sep 30 '10 at 21:33

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