title: How to increase Max upload size with Ajax request
body: <p>I have a simple file upload form using Ajax request to handle it in backend. I setup my php.ini to accept larger files like 64mb. But when I submit the form the validation (ZF2) returns "File '' exceeds the defined ini size". This happen when i try to upload larger file. With small ones i have no problem. After some research i found that ajax requests have some limitations. These are my files. Any one can help.</p>
  
  <pre><code>&lt;form id="upload-form" enctype="multipart/form-data" method="post"&gt;
              &lt;span id="upload-button" class="btn btn-success btn-file"&gt;
                  Select image&lt;input type="file" name="file"&gt;
              &lt;/span&gt;
                  &lt;input type="submit"&gt;
              &lt;/form&gt;
  
  
  
  $('#upload-form').submit( function(e) {
      event.stopPropagation();
      event.preventDefault();
  
      var data = new FormData();
      $.each(files, function(key, value)
      {
          data.append(key, value);
      });
  
      $.ajax({
          url: 'upload/process',
          type: 'POST',
          data: data,
          cache: false,
          dataType: 'json',
          processData: false,
          contentType: false,
          success: function(data, textStatus, jqXHR)
          {
              ....
          },
          error: function(jqXHR, textStatus, errorThrown)
          {
              .....
          }
      });
  });
  </code></pre>