title: Strange problem while uploading large files
body: <p>I am having a strange problem while uploading large files in PHP.</p>
  
  <p>In php.ini, <code>max_execution_time</code> is set to 30, <code>post_max_size</code> is set to 32M, <code>upload_max_filesize</code> is set to 32M. When I tried to upload a file of size 40.2 MB, it don't show any error. The <code>$_FILES</code> variable has the value <code>array(0) { }</code> and <code>$_FILES['userfile']</code> shows <code>NULL</code>.</p>
  
  <p>If the file size is more than the value set in php.ini, then it should return the error message</p>
  
  <blockquote>
    <p>UPLOAD_ERR_INI_SIZE, Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini.</p>
  </blockquote>
  
  <p>But it's not showing any error either (as <code>$_FILES</code> is an empty array). I am clueless why this is happening.</p>
  
  <p>When I change in php.ini and set post_max_size is set to 64M, <code>upload_max_filesize</code> is set to 64M, then it works fine. So, I decided to use the following code, instead of changing php.ini file.</p>
  
  <pre><code>ini_set('upload_max_filesize', '64M');
  ini_set('post_max_size', '64M');
  ini_set('max_execution_time', 300);
  </code></pre>
  
  <p>I even tried to increase <code>max_execution_time</code>. Still, I am having the same problem. <code>ini_set()</code> is not working here.</p>