Hello!
I've install PHP 5.0.4, IIS 5 (port 8080) on winXP sp2.
extract from php.ini:
max_execution_time = 7000 ; Maximum execution time of each script, in seconds
max_input_time = 6900 ; Maximum amount of time each script may spend parsing request data
memory_limit = 300M ; Maximum amount of memory a script may consume (8MB)
file_uploads = On;
post_max_size = 100M;
upload_max_filesize = 90M;
IIS 5 connection timeout is set to 7200 seconds
my intranet connection use modem's (at all branches) and max speed transfer is 128kb/s
The problem is that when the branches try to upload files with size more then 2Mb they can't do that; files with size <2Mb can be upload and very fast!!!
The IIS server log say that the file more then 2Mb produced HTTP error 502!
On localhost or other pc from my local network the upload work very fast!
Where is my mistake?
I have another web application with Tomcat 5(port 80) and JSP, and upload works very fine, without errors!!!
php code use for upload:
<?php
.....
if(move_uploaded_file($_FILES['cale_fis']['tmp_name'], $target_path)) {
$status=0;
$size=0;
if (is_readable($target_path)) {
$size=filesize($target_path);
if ($size>0) $status=1;
}
echo "Fisierul [ ".$name_file."/". round(($size/1024),2). " Kb ] a fost încarcat!";
$query="update ".$table." set data_post=getdate(),end_post=getdate(), status=".$status.",dimensiune=". round(($size/1024),2). " where id=IDENT_CURRENT('".$table."')";
//print "$query<br>";
$result = mssql_query($query, $conn) or die(mssql_error());
//print_r($_FILES);
} else{
$status=0;
$size=0;
if (is_readable($target_path)) {
$size=filesize($target_path);
if ($size>0) $status=1;
}
$query="update ".$table." set data_post=getdate(),end_post=getdate(), status=".$status.", dimensiune=". round(($size/1024),2). " where id=IDENT_CURRENT('".$table."')";
// print "$query<br>";
$result = mssql_query($query, $conn) or die(mssql_error());
echo "Eroare la încarcare!";
}
}
}
......
?>