Answer the question
In order to leave comments, you need to log in
Why are large files not uploading?
Apache server, Odroid XU-4 mini PC, Ubuntu OS. Upload files larger than 8 mb. from the local network do not cause problems. But if you try to upload a file larger than 2 MB from an external network. then the file upload error is guaranteed. What could it be?
php.ini >>>
file_uploads = On
display_errors = On
upload_max_filesize = 80000000
max_file_uploads = 22
post_max_size = 80000000
upload_tmp_dir = download_tmp
memory_limit = 80000000
upload.php >>>
<?php
echo("Start
");
for($i=0;$i";
exit;
}
}
$uploaddir = './download/';
$uploadfile = $uploaddir.basename($_FILES['
if($_FILES["filename"]["size"][$i] > 1024*50*1024)
{
echo ("The file size exceeds 50 Mb");
exit;
}
echo("Test this file
");
// Check if the file is uploaded
if(is_uploaded_file($_FILES["filename"]["tmp_name"][$i]))
{
echo("Download
");
// If the file was uploaded successfully, move it
// from the temporary directory to the target directory
move_uploaded_file($_FILES["filename"]["tmp_name"][$i], $uploadfile);
echo("move
");
sleep(3);
echo "";
} else {
echo("Error download file");
}
}
?>
Answer the question
In order to leave comments, you need to log in
post_max_size
max_file_uploads
upload_max_filesize
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question