The Connection to the Server was Reset While the Page was Loading

I hate this message

I hate this message

I’ve been busy the past couple of weeks (hence the slow posting rate here at the lab).   I’m working on a project (more on this later this week), which requires the ability for the site to handle large file uploads.   I tested the new site and the file upload process and all seemed to work fine till I had a friend submit a file and this is the error that kept coming up.

After the file was sent to me by email, I tried it with the same result.   This lead to a three day journey into GEEK HELL, from which I can say I’ve emerged with the only thing lost being TIME, probably the most precious commodity of all.

The 8 MEG File Upload Limit

The barrier was determined to be 8 meg.   Anything under this size went right through.   Anything over Connection Interrupted.   The first thing I did was a series of searches to find out where I could allow for longer connection times.

WRONG PLACE TO LOOK.   I won’t go into it, but this isn’t where the issue lies.

The Solution

First, I don’t like reading posts where I get all the stuff that didn’t work before I get to what did work.   So I’m going to give it to you right up front then you can read on if you need more information or you try the solution and it doesn’t work.

  • I’m using PHP 5 on my site
  • the php.ini file in the root of my hosting doesn’t work
  • when you go to PHP 5 the file has to be php5.ini
  • In that file you add these lines
    post_max_size = 48M
    file_uploads = On
    upload_max_filesize = 192M
  • You can set the sizes to whatever you want

The Journey to the Solution

Read on and I’ll describe how I got from Connection Interrupted to post-max-size

Two Hour Tech Support Call

I finally did what I never do, I called GoDaddy tech support and spent the next 2 hours either on hold or taking with various tech support people working my way up the ladder as each successive person passed me on to the next.

Finally, The “Supervisor”   said the issue wasn’t with connection times, it was with the php.ini file and I needed to increase the size of the post_max_limit beyond the default 8M.   Also I should increase the max_file_size to match or larger.   She sent me a link to a page to help with the process.

IT DIDN”T WORK (but it should have)

They had me make changes to the php.ini file.   But since I’m running PHP5 those changes needed to be made in a php5.ini file.

Finding Out What you Have

An important piece of the puzzle is verifying what you currently have and if you have fixed it.

  • Create a file with one line in it   <?php phpinfo(); ?>
  • Save this file as test.php and upload it to the root directory
  • In your browser address type in your web address and test.php   Ex. www.mywebsite.com/test.php

The results returned will show you the php settings in place on your site now.

Notice what the post_max_size is as well as the upload_max_filesize   (this should be larger than post_max_size).   Why, if it is a form being submitted there is form data coming in as well as the file itself.

Once you create or change the php5.ini file you refresh your browser page and see if the setting took.

HOWEVER, if you are using a version of php before version 5 the settings file would be php.ini

I hope this information shortens the process for others wanting to be able to have large file uploads on their site.

Print Friendly

About Dave Smith

Did you know that with Twenty Ten if you fill in the User Biographical info field it will put an author window at the end of each post. Be sure to get your gravatar for all authors on your site. And fill out the Bio field in the profile.
This entry was posted in Blogging In General and tagged , , , . Bookmark the permalink.

11 Responses to The Connection to the Server was Reset While the Page was Loading

  1. LeAnn (1 comments.) says:

    THANK YOU THANK YOU THANK YOU – I wasted hours trying to figure this out … I had the parameters set correctly to handle the file size, upload time, etc. but the name of the file was php.ini, not php5.ini (I changed the PHP version in the godaddy hosting control panel.) Why on earth don’t they auto-install a php5.ini file on your site when you change the version????

    Anyway, GODADDY couldn’t even figure this out (after 6 support tickets). I just happened to find this and am very grateful. Thanks again!!

  2. Ki Gray (24 comments.) says:

    I hate the timeouts. I used to have a problem where my putty windowns would time out after 10 minutues of no activity which was insanely frustrating. I would get a call and when I returned to my computer my 5 windows were all dead. I finally went into settings and was able to fix it.

    Personally I would like it when the server timed out the os would send an email to the admin along the lines of “This operation timed out. Here is how you go about changing this setting”

  3. Ki Gray (24 comments.) says:

    I hate the timeouts. I used to have a problem where my putty windowns would time out after 10 minutues of no activity which was insanely frustrating. I would get a call and when I returned to my computer my 5 windows were all dead. I finally went into settings and was able to fix it.

    Personally I would like it when the server timed out the os would send an email to the admin along the lines of \”This operation timed out. Here is how you go about changing this setting\”

  4. Naruto says:

    Men i don’t know what happened to my firefox it keeps saying “The connection was reset while the page was loading” so stupid…and it also says”dns_failure etc. ….” HELP ME PLEASE!!

  5. Dave Smith (1144 comments.) says:

    Naruto,

    Is it every site you try or one in particular? Have you upgraded FF recently?

  6. Icho says:

    Hello, Dave.
    The Connection to the Server was Reset While the Page was Loading
    That`s my problem. Could you give some more detailed info about this thing you describe upper.
    some sites work fine, but others show me that message. i`m using firefox, but IE is the same thing. please help

  7. Icho says:

    where is the roor directory???

  8. Dave Smith (1144 comments.) says:

    Icho,

    The root directory is the directory in which all ther directories and files reside. Wheb you ftp into your site it is usually to the root directory. This is where you will find the php.ini file if it exists.

  9. Alex says:

    This is annoyance that has plaged me for a couple of years… on ocassion it would work then something would mess the config again (though I didn’t know at the time), but surely it is a Firefox problem. Some websites working fine, others don’t. Most of the sites that don’t work are in the intranet, so, no s**t about firewall, proxy, antivirus nothing.
    **** It is a Firefox issue !!! ****** Internet Explorer kept working fine.

    This solution worked for me: something in my Firefox configuration was jacked up, so I after resetting it to defaults it worked again.
    Start firefox in safe mode and select the box to reset settings to default mode; then restart firefox.

    How to start FFox in safe mode:
    open a command window (or a shell) and type on the command line:
    /Firefox -safe-mode

    On Windows you can also do “Start Menu–> Run” and type the command above.

    I hope it helps many of you.

  10. The Property Brain (1 comments.) says:

    wonderful! most hosts dont let you play with php.ini, but if you keep asking their support people they will cave :)

  11. Dave Smith (1144 comments.) says:

    I’ve had hosting with GoDaddy and they did. I have all my hosting now with Bluehost and they provide full access to the php.ini and .htaccess files.

    Dave

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

4,991 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge