Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with file upload > 3MB, please

Status
Not open for further replies.

kknorpp001

Technical User
Dec 22, 2003
13
US
I am unable to upload a file > 3MB and neither myself nor my hosting company can figure it out.

I am getting two different errors on two different machines. One is page cannot be displayed and the other is CGI timeout.

Here are what I know to be the relevant PHP settings:

post_max_size = 15M post_max_size+1 = 16 upload_max_filesize = 10M memory_limit = max_execution_time = 18000 max_input_time = 18000

Also, the IIS timeout is 900s according to hosting company.



Has anyone been able to do > 3MB this on IIS? Would anyone be willing to allow me to test upload on their site so I can keep heat on my hosting company, who is losing steam?

FYI - Here is my PHP code:

<?php

set_time_limit(18000);


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

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

<?
}
else {

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

print &quot;<pre>&quot;;

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

print &quot;</pre>&quot;;

}
?>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top