File Upload Connection Interrupted

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply

Mon Sep 19, 2011 7:09 am

Hey there. I'm having a very mysterious file upload problem. I've got a form where users can select a photo to upload, then they click the submit button. It works just fine with a 25 kb file, but a 100 kb file results in getting an error from the browser saying that the connection was interrupted.

At first, I could only get the upload to work for a 10 kb file and the 25 kb file would result in the same error, but by changing max_execution_time and max_input_time from 30 to 90 I was able to get the 25 kb file to upload successfully (even though it's still taking under 30 seconds). But increasing max_execution_time and max_input_time more than that hasn't solved the problem for files over 25 kb.

Does anyone have any ideas for where I should look? I think this must be a configuration issue, not a code issue, since it's working just fine with smaller files, but now I can't figure out what else could be wrong. If anyone has any ideas, please send them my way. I will be very grateful.



Mon Sep 19, 2011 9:36 am

Also, if it helps, in the form, I've set MAX_FILE_SIZE to 1000000. And in the php5.ini file, post_max_size is 8M.

I'm using php5, apache2 and ubuntu.


User avatar
php-forum GURU
php-forum GURU
Posts: 2192
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Mon Sep 19, 2011 11:17 am

aside from max_post_size, there is an upload_max_filesize.
I recommend changing this to something other than default. I usually use 50mb.


Mon Sep 19, 2011 3:54 pm

That did it!

Even though upload_max_filesize was set to 8M before, changing it to 50M fixed my problem. Thank you!


Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests