Why do files over 400MB not upload via Dropzone?

137 views Asked by At

Hi all: I'm using Dropzone 5.7.2 to upload video files (QuickTime .mov). These things are pretty huge, but I can successfully upload a 350MB file with PHP limits set to:

    ini_set('upload_max_filesize', '800M');
    ini_set('post_max_size', '800M');
    ini_set('memory_limit', '800M');

But I can't upload a 639MB file (or anything over 400MB) with the same settings. I'm running out of places to look for another mystery setting.

I'm running PHP 7.4.11, Apache 2.4.29 on Ubuntu 18.04.5.

Any ideas on what I may have missed?

1

There are 1 answers

1
chiliNUT On

The main issue is you can't set upload_max_filesize with ini_set

File Uploads Configuration Options

Name                Default Changeable
==========================================
upload_max_filesize "2M"    PHP_INI_PERDIR   

https://www.php.net/manual/en/ini.core.php#ini.sect.file-uploads

PHP_INI_PERDIR cannot be changed with ini_set

PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)

https://www.php.net/manual/en/configuration.changes.modes.php

Also, the values shouldn't be the same. You need

memory_limit > post_max_size > upload_max_filesize

post_max_size integer Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.

https://www.php.net/manual/en/ini.core.php#ini.post-max-size