Page 1 of 1

File Upload Help, Please

Posted: Fri Dec 19, 2003 9:11 am
by fstrnu
When trying to upload a file > 3MB, I get the 'page cannot be displayed' error after ~5min. The hosting company tech support say they are able to upload files > 3MB, so we think it is a timeout problem.

Relevant PHP settings that I am aware of are:

post_max_size = 15M
upload_max_filesize = 10M
max_execution_time = 900
max_input_time = 900

They also said that their IIS timeout is set to 300s and I think they bumped it up to 900s as well.

Is there something else we can be trying?? Many thanks in advance!!!!

Here is the code I am using for the upload:

<?php

if (!$_POST['submit']) {

?>
<form enctype="multipart/form-data" action="fileupload.php" method="POST">
file: <input name="userfile" type="file">
<input type="submit" value="Send" name="submit">
</form>

<?
}
else {

$uploaddir = 'd:\\html\\users\\183493\\html\\Upload\'';
$uploadfile = $uploaddir. $_FILES['userfile']['name'];

print "<pre>";

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
print "valid, and success.";
print_r($_FILES);
}
else {
print "nope.";
print_r($_FILES);
}

print "</pre>";

}
?>

connection speed

Posted: Fri Dec 19, 2003 11:52 am
by phpScott
A lot will depend on the speed of the internet connection that the person using the file upload has.
Dail up will take a heck of a lot of time for a 3mb file compared to some one who has cable or dsl.

And there is no way around that.

phpScott

Re: connection speed

Posted: Sun Dec 21, 2003 6:24 pm
by fstrnu
Agreed. However I am the one testing it and it gives me the error after only 5min when the timeout is set to 900s or 15 min. Any other ideas? Thanks again for taking the time to reply...
phpScott wrote:A lot will depend on the speed of the internet connection that the person using the file upload has.
Dail up will take a heck of a lot of time for a 3mb file compared to some one who has cable or dsl.

And there is no way around that.

phpScott

Posted: Sun Dec 21, 2003 9:06 pm
by ex247
it could be the process timeout of the server

Posted: Mon Dec 22, 2003 8:31 pm
by fstrnu
Thanks for your reply. The server is IIS and they say that the timeout is set at 900 seconds. Any other ideas? Is anyone out there successfully uploading files > 8MB using PHP that might be able to help?