Current Software Versions:
filebrowser 6.x-2.x-dev 2010-Sep-19
Drupal 6.19

Reference:
http://drupal.org/node/607228

According to the referenced thread, filebrowser would attempt to load the entire file into memory before downloading. This creates an issue as it effectively limits the max download size to the value of memory_limit in the php.ini file. The thread goes on to state that the issue was resolved in 6.x-2.0-rc-10.

At the time, I upgraded to 6.x-2.0-rc-10 and can vouch that the problem did appear to be fixed as I could download large image files.

However, fast forward to today, and it appears this issue has returned with the filebrowser version stated above. When I try to download a file larger than the value of memory_limit (1024M in my case), I see the following error in my http log files:

[Thu Oct 21 18:21:46 2010] [error] [client 192.168.1.100] PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1071390721 bytes) in /var/www/html/sites/all/modules/filebrowser/filebrowser.module on line 920, referer: http://xxxx.xxxx.xxx/node/121/1543

Can anyone else confirm or deny this behavior on their system?

CommentFileSizeAuthor
#1 filebrowser.largefile.patch1.3 KBknnniggett

Comments

knnniggett’s picture

StatusFileSize
new1.3 KB

The attached patch file represents my attempt to resolve the download file-size limit for 6.x-2.x-dev 2010-Sep-19.

I tested this modification with an 8GB dvd image on my local lan.

Note that I am not an experienced php programmer. I simply Googled for some examples on php.net and then applied them to the filebrowser module. Consequently, I'm looking for feedback from the author and/or someone more experienced than I to validate that this solution works for all cases.

Nicolas Georget’s picture

I did that also, and works fine until right now. But i use my own function to download files and i had added a isset($_SERVER['HTTP_RANGE']) if this superglobal is sent by a browser or a download manager. Maybe it could be a feature request.

Yoran’s picture

Status: Active » Fixed

Thank you. You're patch is pushed to last dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.