title: How to stop a oversize file upload while upload is in process?
body: <p>I'm using apache, PHP.</p>
  
  <p>So, for php, even I set max file size, if someone upload a huge file, it will upload the whole thing to server, and then PHP return error.  is that right?  </p>
  
  <p>I would like the web server or PHP to stop when the file size or the request size is larger than certain size.  </p>
  
  <p>is there a way to do it?  I remember something like setting post_max_size or setting something in apache.conf  but not sure if it will stop when the file goes over the max limit.  </p>
  
  <ul>
  <li>I don't trust client side validation.  so, I'm looking for either apache or php level solution. :)</li>
  </ul>