hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Problem with timeout on IE7.
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Problem with timeout on IE7.

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 01-10-2008, 11:51 AM
cheyenne1212 cheyenne1212 is offline
Web Hosting Master
 
Join Date: Jul 2004
Location: Memphis, TN
Posts: 1,225

Problem with timeout on IE7.


I have a upload script that works fine in FireFox, but times out in IE7, and I can't figure it out for the life of me.


This is the php code

Code:
<?php

// Where the file is going to be placed
$target_path = "uploads/";

/* Add the original filename to our target path.
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$_FILES['uploadedfile']['tmp_name'];

$target_path = "uploads/";

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
}

?>
I have no idea why.

Note: it will work on IE7 if the file is small...but even a small 800KB file will cause it to time out.

In Firefox, I've uploaded 30meg files and its worked fine.

Any ideas?


Edit:

Testing a few things here.

A 44KB file uploaded, but a 88KB file timed out.


Last edited by cheyenne1212; 01-10-2008 at 11:57 AM.
Reply With Quote


Sponsored Links
  #2  
Old 01-10-2008, 12:37 PM
cheyenne1212 cheyenne1212 is offline
Web Hosting Master
 
Join Date: Jul 2004
Location: Memphis, TN
Posts: 1,225
UPDATE:
This works fine in IE6...just not IE7.

I hate this.

But everyone thats going to use this uses IE7

Reply With Quote
  #3  
Old 01-10-2008, 06:53 PM
Barti1987 Barti1987 is offline
Web Hosting Master
 
Join Date: Mar 2004
Location: USA
Posts: 4,342
Your code is very messy:

PHP Code:
<?php
$target_path 
"uploads/";
$target_path $target_path basename($_FILES['uploadedfile']['name']);

if(
move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo 
"The file ".  basename$_FILES['uploadedfile']['name'])." has been uploaded";
} else{
    echo 
"There was an error uploading the file, please try again!";
}

?>
Peace,

__________________
Testing 1.. Testing 1..2.. Testing 1..2..3...

Reply With Quote
Sponsored Links
  #4  
Old 01-10-2008, 08:58 PM
cheyenne1212 cheyenne1212 is offline
Web Hosting Master
 
Join Date: Jul 2004
Location: Memphis, TN
Posts: 1,225
My desk is messy to...lol

Not actually my code...I found it on a script site...just trying to get it working first, then clean it up.

Reply With Quote
  #5  
Old 01-10-2008, 11:26 PM
sharking sharking is offline
Newbie
 
Join Date: Oct 2005
Posts: 15
I think this software can help you !IE Timeout Tuner description
http://www.softpedia.com/get/Tweak/B...ut-Tuner.shtml
This tool can adjust 3 "hidden" registry settings of Internet Explorer to control caching of DNS records, server connection timeout, and caching of server information.

Reply With Quote
  #6  
Old 01-11-2008, 04:26 AM
isurus isurus is offline
Junior Guru Wannabe
 
Join Date: Mar 2007
Location: UK
Posts: 89
Quote:
This tool can adjust 3 "hidden" registry settings of Internet Explorer
Do not run this tool!
Assuming that it actually does something, you will have just hidden the problem on your machine, and hence will not be able to fix it properly for the rest of your users.

Reply With Quote
  #7  
Old 01-11-2008, 04:53 AM
isurus isurus is offline
Junior Guru Wannabe
 
Join Date: Mar 2007
Location: UK
Posts: 89
Have you seen this MS knowledgebase article?
Microsoft Internet Explorer may stop responding for up to six minutes


Quote:
This problem may occur if Internet Explorer or the Microsoft XMLHTTP COM object uses the Microsoft Win32 Internet (WinInet) API for HTTP operations. When a program or object that uses WinInet performs a POST operation, and the connection is closed or reset before a response is returned from the server the POST was sent to, WinInet may establish a new connection. The POST operation may be repeated, but no part of the body of the POST operation is resent.

This problem is likely to occur across slow links if the server-side connection timeout is set very low. Therefore, the server end may close the TCP connection during the time that the server is waiting for the client request to arrive.

WORKAROUND

To work around this problem, make the server timeout longer than the client timeout. When you do so, the client side closes the idle connection before the server side has reached the timeout...snip...
Have you tried firing up a packet sniffer on your server and watching the traffic?
If your server is closes the connection, then IE7 tries to continue the upload, increase your server timeout (as the article suggests) and see whether that sorts it out.


Last edited by isurus; 01-11-2008 at 05:00 AM.
Reply With Quote
  #8  
Old 01-11-2008, 08:54 AM
bigfan bigfan is offline
WHT Addict
 
Join Date: Nov 2005
Posts: 123
By the time the code you posted executes, the browser is out of the picture--the files have already been uploaded. That code does only housekeeping on the server side. So the problem is somewhere else.

Reply With Quote
  #9  
Old 01-11-2008, 11:36 AM
cheyenne1212 cheyenne1212 is offline
Web Hosting Master
 
Join Date: Jul 2004
Location: Memphis, TN
Posts: 1,225
Yeah....

Server side timeout I have set in the php.ini file is 10 minutes.
Max upload size = 250MB

Anything larger than 40-50KB causes IE to time out....so its gotta be a problem with IE itself, as I'm uploading from dual bonded T1's..so 60KB should take no time at all to upload.

I just can't seem to figure out whats causing it.

IE does not stop responding..its still responding, its just that after a minute or so it goes to a "page can't be displayed" error.

Sharking: That software won't really help me any as theres going to be more than just me uploading.

This things going to drive me crazy.

Reply With Quote
  #10  
Old 01-12-2008, 12:14 PM
isurus isurus is offline
Junior Guru Wannabe
 
Join Date: Mar 2007
Location: UK
Posts: 89
What's the URL for the script?

Reply With Quote
  #11  
Old 01-15-2008, 08:24 AM
Razva Razva is offline
Junior Guru Wannabe
 
Join Date: Nov 2007
Location: Romania
Posts: 81
Why bother to configure this script... Isn't far more simple to use another one?

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Outbound Spam Causing Sleepless Nights? Blog 2013-05-13 09:52:21
Go Daddy Identifies Causes of September 10 DNS Failure in Detailed Postmortem Post Web Hosting News 2012-11-12 13:49:14
How To Deliver Products Customers Will Pay For with David Koston - HostingCon 2012 Web Hosting News 2012-07-18 10:46:16
Apache Web Server Adds Cloud Capabilities with First Major Update in 5 Years Web Hosting News 2012-02-21 16:05:02
The Lesson of the Ten, with Jeff Hardy Web Hosting News 2011-08-08 22:12:01


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?