P
P
Pavel Efimov2018-02-15 07:50:13
linux
Pavel Efimov, 2018-02-15 07:50:13

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

3 answer(s)
V
Victor Taran, 2018-02-15
@neon3

post_max_size
max_file_uploads
upload_max_filesize

searched in Google for 3 seconds
If it doesn't work, then
phpinfo to the
studio

J
Justique, 2018-02-15
@Justique

post_max_size ?

P
Pavel, 2018-02-15
@PavelMonro

Most likely the problem is in the network, ie. the download of the file has a time limit for downloading, and during this time it does not have time to download. Accordingly editing Php.ini

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question