Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File upload 404 error on server

I have a PHP file up-loader that we use to upload around 10-15 5mb images every day. I have the image uploader locally and i can upload images fine. I changed all the settings in my php.ini to ensure than i had the correct limits.

Now, i have put the up-loader on a windows server and it has the same settings, but sometimes (not always) when i upload 10-15 images it gets to 97 percent and throws a 404 document not found error.

Does anyone have any ideas as to why this could happen? I have been trying to sort this for days it is really frustrating. I'musing php 5.6 on iis.

like image 722
Gaz Smith Avatar asked Apr 17 '26 12:04

Gaz Smith


1 Answers

IIS returns a 404 error when a POST length is too large:

HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE

You'll need to increase the file upload limit using the parameter:

requestLimits.maxAllowedContentLength

Details of both of these items are on the IIS website: https://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits

like image 132
Egg Avatar answered Apr 19 '26 04:04

Egg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!