title: Very large uploads with PHP
body: <p>I want to allow uploads of very large files into our PHP application (hundred of megs - 8 gigs). There are a couple of problems with this however.</p>
  
  <p>Browser:</p>
  
  <ul>
  <li>HTML uploads have crappy feedback, we need to either poll for progress (which is a bit silly) or show no feedback at all</li>
  <li>Flash uploader puts entire file into memory before starting the upload</li>
  </ul>
  
  <p>Server:</p>
  
  <ul>
  <li>PHP forces us to set post_max_size, which could result in an easily exploitable DOS attack. I'd like to not set this setting globally.</li>
  <li>The server also requires some other variables to be there in the POST vars, such as an secret key. We'd like to be able to refuse the request right away, instead of after the entire file is uploaded.</li>
  </ul>
  
  <p>Requirements:</p>
  
  <ul>
  <li>HTTP is a must.</li>
  <li>I'm flexible with client-side technology, as long as it works in a browser.</li>
  <li>PHP is not a requirement, if there's some other technology that will work well on a linux environment, that's perfectly cool.</li>
  </ul>