0

I made a website on which i need to be able to upload video files and it has worked for quite a while. However after a while it just stopped working and now it will give me the following IIS error message when i upload a video. Images do work (possibly due to their smaller size). I use an html form with PHP server sided script to upload.

enter image description here

I have already set the user permissions for the entire inetpub to allow all actions for the IIS user.

If you have any idea what it could be PLEASE tell me, have been trying to fix this for weeks now.

Thanks in advance!

4 Answers 4

1

You probably have upload_max_filesize and/or post_max_size values set too low in php.ini.

3
  • nope they are set to 1024M and 3000 seconds where applicable, and when this is the problem the server will just give an empty $_FILES array, not an error.
    – dragon112
    Apr 13, 2012 at 10:11
  • Have you verified the php settings took effect by looking at phpinfo() ?
    – uSlackr
    Apr 13, 2012 at 11:11
  • Yes, they all took effect.
    – dragon112
    Apr 17, 2012 at 7:15
1

This worked for me:

In addition to the other standard answers here, if you are using FastCGI click FastCGI settings from home in IIS. Then check the timeouts for ACTIVITY, REQUEST, IDLE. I increased these to 300 seconds and I then could upload larger files.

1
  • Worked for us. Good to keep in mind if you are using Laravel since it requires FastCGI in IIS.
    – Patrick.SE
    Jan 6, 2017 at 14:54
1

I recently worked on a project that required increasing upload size limits in IIS7 as well. I was trying to get to 10 GB...not possible with IIS7 (MS forums for more info).

If you only need files <= 2 GB, you should follow the others advice (Chris and Janne's answers), but if you are looking to get larger files uploaded, IIS7/7.5 will only allow you to go up to 4 GB (4294967295 Bytes), but you won't be able to use all 4 GBs...the most I was able to increase it too was 1/2 that.

In your web.config file, you can change the maxAllowedContentLength (More info here):

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

The above edit will allow you to get 2 GB uploads in combination with changing your php.ini file. You may want to increase your script execution time within your script using ini_set('max_execution_time', 300); //300 seconds = 5 minutes, as larger files may take longer.

Good luck and all the best!

1
  • This worked for me, the defualt value is set to 30MB so i had to increase the value.
    – Baumi
    Apr 16, 2019 at 8:21
0

Dragon, Do you have "Request Filtering" module installed? Within this module, if you edit the feature settings (on the right sidebar) you'll find a "Maximum allowed content length (Bytes)" setting. That is the only other setting I can think of that might cause this.

Request Filtering Settings

3
  • This is all set to 512000000 (512MB) the file i'm uploading is 50 MB, that is not the problem.
    – dragon112
    Apr 17, 2012 at 7:15
  • Not to mention that the error seems to single out the PHP handler. As an aside, 512000000 KB is 488 MB :-) Apr 17, 2012 at 12:18
  • Yea i know, its kinda like HDD's.. They promise you 512GB but in reality you have like 460.. (the thiefs!)
    – dragon112
    Apr 17, 2012 at 13:03

You must log in to answer this question.

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