3

I'm trying to get my website to upload video's and pictures. As I have made more websites that upload pictures there is no problem on that front, but when i try to upload a video for some reason it can't be found in the $_FILES array that contains an uploaded image.

I have already googled and found stuff about the php.ini file and IIS 7 containing max sizes for uploads. these are all set to 1024M:

In php.ini:

max_execution_time = 1000
max_input_time = 1000
memory_limit = 256M
upload_max_filesize = 1024M
post_max_size = 1024M

In IIS 7:

maxAllowedContentLength = 1073741824
maxRequestLength = 1073741824

After some testing it appears that really small video files do work (192KB) but somewhat bigger doesnt show anyting in the $_FILES array (11MB) but really big files (80MB) gives an error: The request filtering module is configured to deny a request that exceeds the request content length.. The problem is that i have set the maxAllowedContentLength to 1GB. So that shouldn't happen?! An image of this is down below:

Image

enter image description here

Any help or advice is greatly appriciated!

2 Answers 2

5

HTTP Error 404.13 means that the IIS7 request filtering module is killing the request because the request is too large.

The correct way to increase this is by configuring the maxAllowedContentLength value in the system.webServer > security > requestFiltering configuration section of your site's web.config.

For example:

<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <!-- Allow 100MB requests -->
                <requestLimits maxAllowedContentLength="100000000" />
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

For more information see:

Request Limits - IIS.NET

1
  • Great, this fixed it.
    – dragon112
    Dec 18, 2011 at 11:22
0

I had to edit the C:\Windows\System32\inetsrv\config\applicationHost.config file and add <requestLimits maxAllowedContentLength="1073741824" /> to the end of the...

<configuration>
    <system.webServer>
        <security>
            <requestFiltering>

section

1
  • You should really try to avoid editing the global IIS configuration like that. Instead you should do what the previous answer said and edit only the config for the particular site which needs such large requests. Doing it the way you did exposes other sites you might have running on the server to requests that are much larger than they are expecting.
    – Moshe Katz
    Jan 30, 2017 at 3:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .