Web Hosting Talk







View Full Version : Problem with timeout on IE7.


cheyenne1212
01-10-2008, 11:51 AM
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


<?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.

cheyenne1212
01-10-2008, 12:37 PM
UPDATE:
This works fine in IE6...just not IE7.

I hate this.

But everyone thats going to use this uses IE7 :(

azizny
01-10-2008, 06:53 PM
Your code is very messy:


<?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,

cheyenne1212
01-10-2008, 08:58 PM
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.

sharking
01-10-2008, 11:26 PM
I think this software can help you !IE Timeout Tuner description
http://www.softpedia.com/get/Tweak/Browser-Tweak/IE-Timeout-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.

isurus
01-11-2008, 04:26 AM
This tool can adjust 3 "hidden" registry settings of Internet ExplorerDo 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.

isurus
01-11-2008, 04:53 AM
Have you seen this MS knowledgebase article?
Microsoft Internet Explorer may stop responding for up to six minutes (http://support.microsoft.com/kb/833301)

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.

bigfan
01-11-2008, 08:54 AM
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.

cheyenne1212
01-11-2008, 11:36 AM
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.

isurus
01-12-2008, 12:14 PM
What's the URL for the script?

Razva
01-15-2008, 08:24 AM
Why bother to configure this script... Isn't far more simple to use another one?