Php – getting an internal server error when uploading files over 10MB

PHPupload

I'm writing my own little file upload CMS in php for my website.

The problem I'm having is that whenever I upload anything over 13MB or so the upload reaches 100% then instantly greets me with an internal server error page, and the file is not uploaded. Other than that the file uploading works completely perfectly.

For reference, I changed all of these php ini settings and it still doesn't work:

max_execution_time = 1200     
max_input_time = 1200   
memory_limit = 120M      
max_file_uploads =120MB  
upload_max_filesize = 120M
post_max_size = 130M

and the code I'm using to store my files is after they've been posted is:

move_uploaded_file($_FILES["upload"]["tmp_name"], $_SERVER['DOCUMENT_ROOT']."/download/".$name);

Also my website's running on a virtual server provided by fatcow.

Thanks in advance for any help.

Best Answer

Well, I got an answer, but its not a good one.

Apparently, although it says nowhere on their site, the max file upload size on their server is 10MB, no matter what you change in the php ini or otherwise. I had to go through live chat and all that jazz to learn this, and it sucks.

So a word to the wise, if you want decently sized user upload, don't host with fatcow.

Related Topic