File Upload Help, Please
Posted: Fri Dec 19, 2003 9:11 am
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>";
}
?>
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>";
}
?>