|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14827 POST [file upload] timeout in browsers
Submitted: 2002-01-03 10:15 UTC Modified: 2002-01-03 10:53 UTC
Avg. Score:2.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: michael at antipersonnel dot org Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.1.0 OS: windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: michael at antipersonnel dot org
New email:
PHP Version: OS:


 [2002-01-03 10:15 UTC] michael at antipersonnel dot org
i am attempting to have users upload files from their computer to my web server. i seem to be experiencing a timeout in both IE and NN. i have changed the server and php.ini settings accordingly, but timeouts still occur.

i have gone through many lists and forums looking for an answer, and while i notice people posting they can upload
[quite] large files, no one details the network environment [ie., intra/internet], browser, web server, client machine, etc.  i am sure someone out there is experiencing timeouts in both IE and NN when attempting to upload large files.

i can upload files fine, until the filesize is greater than what i can upload within the timeout. IE times out at about 5 minutes, and NN varies around there. so far, the largest file i have been able to upload was about 10MB or so, on a

i have tried the ReceiveTimeout registry entry for IE, but it does NOT work in IE6.

i have a prefs.js entry for NN that might work, but have to wait until tonight to test it out.

now, i know it is the browser that is timing out [at home at least].  is there a way to keep sending pertinent info to the browser during a copy() function, in order to keep the connection alive, and not have the browser timeout?

or, is there another way to do a file upload via the broswer, that won't time out?  i cannot tell is this is a php bug, a browser bug, or just plain old operator headspace.  thanking you in advance.

michael defrees

here are my current settings:

win2k adv server 
IIS 5 
php 4.1.0 

webserver settings: 
connection timeout = 1800 

php.ini settings:
max_execution_time = 1800 
memory_limit = 50M 
post_max_size = 50M 
file_uploads = On 
upload_tmp_dir = c:\php\upload_temp 
upload_max_filesize = 50M 

the page is here: 

please do not be malicious, the error handling was removed in order to debug the timeout.

files uploaded will be located here: 

here is the code:

$sizelimit = "no"; 
$sizebytes = "200000"; 
$dl = ""; 
$absolute_path = "d:/inetpub/wwwroot/"; 
$websiteurl = ""; 
$websitename = ""; 

switch($action) { 

<a href=$PHP_SELF?action=upload>Upload File</a> 
<a href=$websiteurl>Return to $websitename</a> 

case "upload": 

<form method=POST enctype=multipart/form-data
<p>File to upload:<br> 
<input type=file name=file size=30> 
<p><input value=submit name=submit type=submit> 

//File Upload 
case "doupload": 
$dir = "dir"; 
if ($file != "") { 
if (file_exists("$absolute_path/$file_name")) { 
die("File already exists"); 
if (($sizelimit == "yes") && ($file_size > $sizebytes)) { 
die("File is to big. It must be $sizebytes bytes or less."); 
copy($file, "$absolute_path/$file_name") or die("The file you are
trying to upload couldn't be copied to the server");
} else {  die("Must select file to upload"); 
echo " 

echo $file_name." was uploaded"; 
echo "<br> 
<a href=$PHP_SELF?action=upload>Upload Another File</a> 
<a href=$websiteurl> Return to $websitename</a> 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-03 10:53 UTC]
Try to use set_time_limit() function to prevent timeouts.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 16:01:29 2024 UTC