FileChucker: Installation Instructions
Instructions: Apache on Mac/Linux/BSD
Instructions: Apache on Windows
Instructions: IIS on Windows
FAQ
Performance
Support
Changelog
Quick Instructions for Most Servers (Apache on Linux, Mac OS X, BSD)
Unzip your filechucker.zip file, and then upload the contents of the www.example.com folder onto your website. Then visit the following address, replacing example.com with your own domain name:
www.example.com/cgi-bin/filechucker.cgi
If that works, then FileChucker is installed properly. You should now read the FAQ.
If nothing works, read the full instructions.
Quick Instructions for Apache-on-Windows Servers
Other than Apache itself, the only thing that's strictly required is Perl. If your server doesn't already have Perl installed, download and install the free ActivePerl. You may need to reboot after installing it. Open a command prompt and type perl -v and if you get some output about Perl and its version info, you should be all set.
If you had to install Perl, you may also want to install the DBD::MySQL Perl module (if you want to use any of FileChucker's optional database-based features), and the MIME::Lite, MIME::Base64, and Authen::SASL modules (if you want to use any of the email features), by opening the Run dialog or a command prompt and then typing ppm install DBD-mysql (or ppm install MIME-Lite etc). Or you can run just the ppm command by itself to use the graphical installer.
Now follow the regular Apache instructions.
Quick Instructions for IIS-on-Windows Servers
If your server doesn't already have Perl installed, download and install the free ActivePerl. You may need to reboot after installing it. Open a command prompt and type perl -v and if you get some output about Perl and its version info, you should be all set.
If you had to install Perl, you may also want to install the DBD::MySQL Perl module (if you want to use any of FileChucker's optional database-based features), and the MIME::Lite, MIME::Base64, and Authen::SASL modules (if you want to use any of the email features), by opening the Run dialog or a command prompt and then typing ppm install DBD-mysql (or ppm install MIME-Lite etc). Or you can run just the ppm command by itself to use the graphical installer.
Unzip your filechucker.zip file, then open the www.example.com folder and move the contents of the cgi-bin folder into the upload folder. Then delete the cgi-bin folder. Upload the "upload" folder onto your website, then visit the following address, replacing example.com with your own domain name:
www.example.com/upload/filechucker.cgi
If that works, then FileChucker is installed properly. You should now read the FAQ.
If nothing works, read the full instructions.
Full Instructions for Most Servers (Apache on Linux, Mac OS X, BSD)
Note I: Do not edit the filechucker.cgi file unless absolutely necessary; instead, edit filechucker_prefs.cgi for all your customizations.
Note II: if you are using Windows on your desktop, and when you open the *.cgi file, the lines all appear to be crunched together, try opening it in Wordpad (not Word) instead. In Wordpad, save the file; this should fix the line-endings so the file's contents appear correctly in other editors like Notepad.
On your website:
- First, complete the quick instructions.
- Set the permissions on /cgi-bin/filechucker.cgi (aka, chmod it) to world-readable and world-executable, that is, a+rx or mode 0755. Do NOT use 0777.
- Set the permissions on the /cgi-bin/encdata/ directory to world-readable, -writable, and -executable, that is, a+rwx or mode 0777.
- Set the permissions on the /upload/files/ directory to world-readable, -writable, and -executable, that is, a+rwx or mode 0777.
- Now visit yoursite.com/cgi-bin/filechucker.cgi in your browser and FileChucker should be working properly.
- If you get an Internal Server Error, it's most likely a permissions problem. See this page for more details.
- Read the FAQ.
Now FileChucker is ready to run, and you can access it by going to yoursite.com/cgi-bin/filechucker.cgi (or yoursite.com/upload/ if your server supports it).
Full Instructions for Apache-on-Windows Servers
Note I: Do not edit the filechucker.cgi file unless absolutely necessary; instead, edit filechucker_prefs.cgi for all your customizations.
Note II: if you are using Windows on your desktop, and when you open the *.cgi file, the lines all appear to be crunched together, try opening it in Wordpad (not Word) instead. In Wordpad, save the file; this should fix the line-endings so the file's contents appear correctly in other editors like Notepad.
On your website:
- First, complete the quick instructions.
- Now visit yoursite.com/cgi-bin/filechucker.cgi in your browser and FileChucker should be working properly.
- If it doesn't execute or you get errors, you may need to change the first line of the filechucker.cgi file from #!/usr/bin/perl to either #!perl or #!c:\path\to\perl.exe
- If it doesn't execute or you get errors, you may need to rename the script and its prefs file from a .cgi extension to a .pl extension.
- If you get errors about FileChucker being unable to delete something from the encdata or files folder, you may need to set a "Delete" bit on the folder's properties.
- Read the FAQ.
Now FileChucker is ready to run, and you can access it by going to yoursite.com/cgi-bin/filechucker.cgi (or yoursite.com/upload/ if your server supports it).
Full Instructions for IIS-on-Windows Servers
Note I: Do not edit the filechucker.cgi file unless absolutely necessary; instead, edit filechucker_prefs.cgi for all your customizations.
Note II: if you are using Windows on your desktop, and when you open the *.cgi file, the lines all appear to be crunched together, try opening it in Wordpad (not Word) instead. In Wordpad, save the file; this should fix the line-endings so the file's contents appear correctly in other editors like Notepad.
On your website:
- First, complete the quick instructions.
- Now visit yoursite.com/upload/filechucker.cgi in your browser and FileChucker should be working properly.
-
If it doesn't execute or you get errors, you may need to complete one or more
of the following steps (most are not necessary on most IIS servers, so try one at a time):
Rename the script and its prefs file from a .cgi extension to a .pl extension.
Change the first line of the filechucker.cgi file from #!/usr/bin/perl to either #!perl or #!c:\path\to\perl.exe
For the /upload/encdata and /upload/files folders, do the following: right-click on the folder, choose Properties, and go to the Security tab. Find or add the IUSR_computername account, and give it "Full Control". This account is sometimes called the Internet Guest Account.
Run the inetmgr command and change the CGI web service extension from "prohibited" to "allowed". If your Web Service Extensions list doesn't include an item for Perl CGI scripts, then add a new one (named something like "Perl CGI", or "CGI Scripts", etc -- the name is not important), and for its "Required Files", enter C:\Perl\bin\perl.exe "%s" %s (adjust the path as necessary for your Perl installation)
Run the inetmgr command and right-click on the website and choose Properties. Go to the "Home Directory" tab, then to "Application Settings", and set "Execute permissions" to "Scripts and Executables".
Run the inetmgr command and go to "Application Settings" then "Configuration", and add an application extension for .cgi (and .pl) with the executable set to: C:\Perl\bin\perl.exe "%s" %s (adjust the path as necessary for your Perl installation)
Run the inetmgr command and right-click Default Web Site (or your site's name, if different). Then click New -> Virtual Directory and follow the prompts, entering "upload" as the name of the virtual directory, and choosing FileChucker's upload folder (c:\inetpub\wwwroot\upload\ by default) for the path. For Access Permissions, check (enable) the Read, Run Scripts, and Execute boxes. When finished, right-click the new virtual directory and choose Properties -> Application Configuration -> Mappings, and make sure there's a .cgi (and/or .pl) extension there, mapped to the C:\Perl\bin\perl.exe "%s" %s command (or your server's path to perl.exe).
If you get errors about FileChucker being unable to delete something from the encdata or files folder, you may need to set a "Delete" bit on the folder's properties.
Create the c:\temp\ folder if it does not exist; if this isn't possible, and you get errors or failures when you try to upload files, then set $PREF{disable_upload_hook} = 'yes' in filechucker_prefs.cgi. - (Optional; recommended) You may want to disable directory-listing for your /upload/ directory; you can do this through inetmgr.
- (Optional; recommended) If your server runs PHP, then you should disable it for your /upload/files/ directory, so that visitors can't upload PHP applications and modify the files on your server. (FileChucker does disallow the uploading and listing of dangerous file extensions including .php by default, but disabling PHP execution for your uploads folder will further strengthen your installation's security.)
- (Optional) To increase IIS's CGI timeout, which will prevent large uploads if set to a low value, you need to set the "CGITimeout" metabase value to a large number, like 5000 or 10000 or more. There are several ways to adjust this value. One is to use the Metabase Explorer, from the IIS Resource Kit. Another is to run the inetmgr command, right-click "Local Computer", choose Properties, then check "Enable Direct Metabase Edit"; then edit the file c:\windows\system32\inetsrv\metabase.xml in a text editor (you may need to use Notepad, not Wordpad), find the CGITimeout setting, and change it to a larger value.
-
(Optional) FileChucker's image features (thumbnails, rotation)
require an image-processing library like GD or ImageMagick. To
install the GD Perl module, open a command prompt and run the command
ppm install http://theoryx5.uwinnipeg.ca/ppms/GD.ppd or
ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/GD.ppd
one of which should work depending on your version of Windows and ActivePerl.
To install ImageMagick, go to www.imagemagick.org and download & install the binary release for Windows. Then read this FAQ item for instructions on setting $PREF{convert_command}. - Read the FAQ.
Now FileChucker is ready to run, and you can access it by going to yoursite.com/upload/filechucker.cgi (or yoursite.com/upload/ if your server supports it).
Performance
First, it should be noted that FileChucker itself imposes no limits on the amount of data that can be transferred (except whatever limit you specify in your setting for $PREF{sizelimit}). FileChucker also does not place any limit on the speed of an upload. If you are having trouble with uploading large files, or with uploads going really slow, the problem is in your network, or somewhere else in your server's hardware or software configuration. Many FileChucker users on many platforms (Windows, Linux, IIS, Apache, OS X Server) are uploading files sized in the hundreds of megabytes, so the problem is not within FileChucker.
In a test upload of a 700MB file across a 100mbit LAN, the transfer
ran at about 5MB/sec, requiring about 2.5 minutes to complete.
After the actual data-transfer was complete, the server spent ~50 seconds
processing the file (CGI.pm's internal processing) before the script
finished running. (FileChucker now has the ability to avoid this
extra processing time altogether, as long as your server is running
a relatively recent Perl distribution.) The server was a Dell Dimension 1100 desktop
system, with an Intel Celeron 2.53GHz CPU (256 KB cache, 5061.56 bogomips),
512MB RAM, 1GB swap, and a standard 7200RPM ATA IDE disk. The
server was running Apache 2.0.54 with a fairly standard installation.
During the upload, the server's RAM and swap usage did not increase
significantly (probably a few KB or a few tens of KB), because the uploaded file
got streamed to disk (to a temporary file) by CGI.pm. This is
why the server needed to spend ~50 seconds processing the file after
the upload was complete: it was decoding the raw POST data from the temporary
file into the actual final destination file. (Again, FileChucker
no longer needs to do this.)
In a second test upload on the same server as above, a 1.4 gigabyte file took about 5 minutes to upload, and when the data finished transferring, the server spent just under 2 minutes doing POST-processing before the script finished.
The one thing we've seen that's helped to increase performance during file-uploads (aside from faster hardware and/or a faster network link) is to make sure the server has a recent version of the CGI.pm Perl module. In FileChucker, if you enable the debugging PREFs, then visit your server's FileChucker installation in your browser and pass ?debug on the end of the URL, then view the page's source-code, at the bottom you'll see a bunch of debugging information inside of an HTML comment. One of the items near the top of this info is the CGI version that your server is running. The current version is somewhere around 3.20 or greater; if you're in the 2.xx series, or even the low 3.0x series, then upgrading your Perl installation (which will upgrade your CGI.pm module) may give you better performance during uploads.
If you want to upload files larger than 2 gigabytes, then you can't use Apache 1.3.x or 2.0.x. You need to use Apache 2.2.x, as explained on the "New Features in Apache 2.2" page:
Large File Support httpd is now built with support for files larger than 2GB on modern 32-bit Unix systems. Support for handling >2GB request bodies has also been added.
Support
If you need any help with FileChucker, please complete the following steps in order:
- Make sure you've followed the installation instructions.
- Make sure you've read the FAQ.
- If you're getting an Internal Server Error, read the Internal Server Error page.
- If you're getting errors about missing Perl modules, read the installing Perl modules page.
- The troubleshooting page has some FileChucker-specific solutions that may help.
- If you still need help, you can contact us. Be sure to send us the full URL to the script on your server.