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

01-10-2008, 12:37 PM
|
|
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 
|

01-10-2008, 06:53 PM
|
|
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...
|

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

01-10-2008, 11:26 PM
|
|
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.
|

01-11-2008, 04:26 AM
|
|
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.
|

01-11-2008, 04:53 AM
|
|
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.
|

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

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

01-12-2008, 12:14 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Mar 2007
Location: UK
Posts: 89
|
|
What's the URL for the script?
|

01-15-2008, 08:24 AM
|
|
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?
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| 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
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|