title: PHP unable to take files of specified file size
body: <p><strong>I want to get a text file upto size 20 Mb via browser.</strong>   </p>
  
  <p>My php code is:</p>
  
  <pre><code>$allowedExts = array("txt");
  $temp = explode(".", $_FILES["file"]["name"]);
  $extension = end($temp);
  $file_name=$_FILES["file"]["name"];
  
  if ((
     ($_FILES["file"]["type"] == "text/plain"))
  &amp;&amp; ($_FILES["file"]["size"] &lt; 5243000)
  &amp;&amp; in_array($extension, $allowedExts))
  { echo "Uploaded : " . $_FILES["file"]["name"] . "&lt;br&gt;";}
  
  else {echo "Invalid file";}
  </code></pre>
  
  <p><strong>Note: my php ini settings are :</strong>    </p>
  
  <pre><code>ini_set("upload_max_filesize", "20M");
  ini_set("memory_limit", "32M");
  ini_set("post_max_size","20M");  
  </code></pre>
  
  <p><strong>but My browser throwing : Invalid File. even for 3 Mb file (<em>less than 2 Mb is working fine</em>)<br>
  Extension is .txt only,<br>
  I am  sure extension is not a problem.</strong><br>
  What might be the one and solution for it?</p>
  
  <p><strong>UPDATE:<br>
  my PHP.ini says: Maximum allowed size for uploaded files. upload_max_filesize = 20M<br>
  but my php info(); still says: upload_max_filesize  local 2M    master 2M</strong></p>