0

i have an upload system in php, i want it to upload large files, some may get up to 200mb. This means that it will not only take a lot f bandwidth, server memory space but also a lot of time to upload these files.

Now i have a system working, but it seems to fail when trying to upload a large file. I've tested it with a a file that is 22mb and it works like a charm, whoever, when i up this to a file that is about 89.4mb it fails, it goes through the whole upload process but when it tries to post the file it gives me an error.

No i have changed a number of settings in the php.ini file:

  • upload_max_filesize
  • post_max_size
  • max_input_time
  • max_execution_time
  • memory_limit

I then realised that my IIS server has an execution time limit set and that was at about 2 minutes so i made this about 30 (note in testing i the upload of the 80.4mb file was around 23 minutes or so). Error i get is "404 - File or directory not found". This is strange because to doesn't do it for the smaller file.

The only thing i can think of is that there is a setting somewhere in my Windows Server that is stopping my system from moving such a big file from temp files to the correct directory.... Or maybe the temp files cannot handle such a file size?

So, i was wondering if someone could write a check list of the settings that need to be updated in order to upload large files like this because i am almost there, it's just something is stopping me.

Thanks in advance.

1 Answer 1

1

I think you need to look at the httpRuntime attribute called maxRequestLength. This value defaults to 4096 KB (4MB)

If you have the Request Filtering feature installed you might also want to look at the requestLimits attribute called maxAllowedContentLength. This value will default to 30.000.000KB, so if you need to upload files bigger than 28MB, you'll have to increase this value as well

1
  • So i changed both those settings to 120000000 and still getting the 404 error! This is really starting to annoy me now i can't find why i'm getting this. any other settings you can suggest? Also do you know where the server would log the 404 error?
    – ragebunny
    Jul 23, 2013 at 15:05

You must log in to answer this question.

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