I have a small internal webpage (running on my own server) to enable users to upload large files.
As long as the file is not larger than 1GB everything works fine.
With larger files the function move_uploaded_file returns FALSE.
Unfortunately I don't get a clue for the reason. No error message in error logs of apache or php. Neither a warning message.
What could be the reason for that limitation?
Here's what I set in php.ini (only relevant entries):
max_execution_time=1200
max_input_time=60
memory_limit=-1
error_reporting=E_ALL
display_errors=On
log_errors=On
report_memleaks=On
track_errors=On
file_uploads=On
upload_max_filesize=5120M
max_file_uploads=50
The apache config is mainly default from xampp, but only ssl connections are supported, ssl certificate is properly installed.
Version xampp-win32-5.6.3-0-VC11
Here's the upload scipt:
- Code: Select all
if (file_exists("/upload/files/") && is_writable("/upload/files/")) {
for ($i = 0; $i < $num_uploads; $i++) {
$xfile = "fileupload".$i;
$name = basename($_FILES[$xfile]['name']);
$filename = "/upload/files/".$name;
$tmpname = $_FILES[$xfile]['tmp_name'];
$success = move_uploaded_file($tmpname, $filename);
if (!$success) {
echo "Warning! Error uploading file <br/> $tmpname <br/> $filename <br/>";
exit;
}
}