1

We have a store where we sell downloadable products only (video files). Since it's mostly large files we don't use the Magento uploader but put the files on the server via FTP and then edit the database for the correct path. This has worked great so far.

Now we have files that are larger than 2GB, we use the same process, but the files are not recognized by magento meaning the backend doesn't show the files in the download information tab in product backend. Consequently the product can not be sold and or downloaded by customer.

Files up to 1.999999999999 GB work just fine so I guess it's not related to max_file_uploads in php.ini which is set way lower anyway.

Now in lib/Zend/Validate/FileSize.php I found

 // limited to 2GB files
 $size += @filesize($files);
 $this->_size = $size;
 if (($max !== null) && ($max < $size)) {
     if ($this->useByteString()) {
         $this->_max  = $this->_toByteString($max);
         $this->_size = $this->_toByteString($size);
         $this->_throw($file, self::TOO_BIG);
         $this->_max  = $max;
         $this->_size = $size;
     } else {
         $this->_throw($file, self::TOO_BIG);
     }

But i can't find where to set the 2GB Limit. How can I increase the allowed file size?

1 Answer 1

1

The problem is not with the upload limits.
It's because pf the PHP limits.
It seams that on 32bit systems you cannot use filesize to read the file size of files over 2GB.
And Magento uses filesize to read the sizeof the file. Here is an example

Source: https://stackoverflow.com/questions/5501451/php-x86-how-to-get-filesize-of-2gb-file-without-external-program?rq=1

2
  • So that means there is nothing to do except to move to a 64 bit system?
    – fame media
    Commented Sep 23, 2015 at 13:31
  • I'm not an expert on this, but it looks like it. Or maybe you can split your downloadable products in multiple files and let the user put them together, but I guess this could get tricky.
    – Marius
    Commented Sep 23, 2015 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.