FileRUN - Web based document flow management system

Downloading very large files

From FileRun Documentation

Applies to FileRun version (020710A)

Most shared hosting services configure the servers so that PHP scripts that are running for too long (usually more than 30 seconds) and use to much CPU or memory are automatically stopped. This is to save money by crowding as many customers as possible on a single server. Downloading large files trough PHP, using a slower internet connection can take quite a long time, requiring the PHP process to run for a few minutes. If your large downloads do not complete successfully, you might want to take advantage of this workaround. This will make FileRun pass the download to the web server (Apache), instead of letting PHP deal with it.

The module "mod_rewrite" needs to be enabled in Apache, in order for this to work.

To enable the workaround, please follow these steps:

  1. Open "/path-to-filerun/customizables/config.php" in a text editor
  2. Copy and paste the following three lines of PHP code inside:
 
$config['enable_download_trick'] = true;
$config['download_trick_minimum_filesize'] = 20971520;//in bytes, recommened value: 20971520 (20MB)
$config['download_trick_links_life'] = 10; //in seconds, recommended value 10
 
  1. Make sure a file named ".htaccess" is availabe inside the folder "/path-to-filerun/download". If a file "htaccess.txt" exists in the folder, please rename it to ".htaccess".

If you are getting a "500 Internal Server Error" when trying to download files, most probably "mod_rewrite" is not available on your server.