2

I have changed the maxfile size in the php.ini settings, but i do not know how to change it in the IIS 10 config.

My hphinfo: enter image description here

I am getting the error 1 in the $_FILE array (which as I understand means that the request size exceeds the max allowed.

I am sending smaller files (ie 1M or 2M without any problems)

The POST request is generated by my software (it is an ucontroller controlled device) and here is no browser involved in it.

  • Can you please post the exact error? Also what is your upload_max_filesize value set to in php.ini? – Jarco Apr 3 at 14:47
  • @Jarco upload_max_filesize -> 8M I think it is IIS problem. The error is 1 in the "error" ($_FILE variable) – P__J__ Apr 3 at 15:10
2

From: https://www.inflectra.com/support/knowledgebase/kb306.aspx

By default, IIS web server allows for limited file size to be uploaded to the web server. For IIS 6 and IIS 7, the default maximum file upload size is 4 MB and 28.6 MB respectively. IIS 7 returns a 404 error (HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE) if someone uploads something larger than 30MB. In order to allow for larger file size uploads, a few server changes are required.

Modify the maxAllowedContentLength setting in the web.config:

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="2147483648" />
    </requestFiltering>
  </security>
</system.webServer>

With the above maxAllowedContentLength, users can upload files that are 2 GB in size. This setting will work right away without restart IIS services.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.