Large File Downloads

Large file Downloads can fail when using Drupal's private file setting due to the script timing out.

Apply the following patch to file.inc in Drupal 5.

Index: filemanager.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/filemanager/filemanager.module,v
retrieving revision 1.18
diff -u -r1.18 filemanager.module
--- modules/filemanager/filemanager.module	14 Sep 2006 06:06:30 -0000	1.18
+++ modules/filemanager/filemanager.module	6 Nov 2006 22:00:16 -0000
@@ -1040,8 +1040,11 @@
// Transfer file in 1024 byte chunks to save memory usage.
if ($fd = fopen($source, 'rb')) {
+    set_time_limit(0);
while (!feof($fd)) {
print fread($fd, 1024);
+      ob_flush();
+      flush();
}
fclose($fd);
}