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>";
}
?>
File Upload Help, Please
Moderator: General Moderators
connection speed
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
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
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