On 01/15/2014 11:30 AM, MOKRANI Rachid wrote: > Hi, > > If you need to send file bigger than 2go under linux (Centos 5.5) you have to > set the following parameters in /etc/php.ini > > For unlimit upload size. > post_max_size = 0 > upload_max_filesize = 0 > > Then you can limit the size of the upload by adding the following parameter > in the file http.conf > For 5Gb > LimitRequestBody 5120000000 > > With this solution if a file exceeds the allowed size, unfortunately the web > page does not display an error message but a blank page. > > It's a pity
Noted that: - "LimitRequestBody 0" on apache 2.4 should be enough (I verified the source of 2.4.7). Though no limit might be a bit problematic. - post_max_size/upload_max_filesize have a parsing bug in PHP, which is still present in PHP 5.5.8: https://bugs.php.net/bug.php?id=44522 A fix has been committed, but not yet released. This bug prevents you from setting any value larger than 2 (or 4) GB even when PHP is compiled to 64bit, though all version respect the "no limit" (0) value, which is why setting them both to 0 allows you to upload any size. In this configuration however the upload is not aborted if the limit is exceeded. Also importnat is that in the default DL configuration, "$maxSize" is defined as ini_get('upload_max_filesize'). If upload_max_filesize is 0, you should manually set $maxSize to some value to show the limit correctly in the web interface.