Installation

Things to Watch For

  1. When you upload and download files use an ftp program like filezilla, ws_ftp, cuteFTP or fetch and ALWAYS transfer the files as ASCII.
  2. All filenames are lower case. Insure that this does not change.
  3. Use a text or HTML editor to configure any parameter files or templates.
  4. This program works with mySQL. We recommend you install also a SQL Manager. We recommend mysqlman created by Gossamer Threads.


Installation A+ Download

Please read the instructions first before implementing them. To assist in your installation we have added checkboxes at each step which you can use to track that everything has been done.

The links on the left called Files describes the application files and their permissions.

  1. Unzip Files on Local Machine
    Unzip the zip file onto your local computer . (The zip files have been created on a Windows machine and so should be unzipped on a windows local computer and then uploaded to the server using ftp.) .

  2. Perl Path
    The perl path defined at the top of each script is #!/usr/bin/perl . If the path to the perl program is different from this then change the top line in all the scripts. (Note: 99% of servers use that path.)

  3. Path Definitions
    In the current version the Path Definitions are automated by using the CGI environment variables: SCRIPT_FILENAME to find the cgi-bin, DOCUMENT_ROOT to extract the document root and HTTP_HOST to extract the domain name. If this does not work then you may have to hard code the paths in the file called startup_download.pl. Instructions are inside the script if you need to do this.

  4. Upload Files To Server
    With an ftp program upload the folder aplusdownload from your local machine in one go to the cgi-bin . This will include all subfolders and corresponding files.

  5. Create a secure folder to store the download files:
    1. There are 2 choices. Create an obscure folder name in the cgi-bin under /cgi-bin/aplusdownload/data or above Document Root. The obscure folder name should be something composed of random characters and numbers.

      Example under the cgi-bin: /cgi-bin/aplusdownload/data/y3s23a9023ewdsl


  6. Under document root (location of web pages):
    1. Create a folder called paypal. Upload the file called cancel.htm. This file is in folder /cgi-bin/aplusdownload/templates but should be moved to the paypal folder just created.


  7. File Permissions
    1. Scripts run under user click here
    2. Scripts run under the userid of the web server: click here


  8. Test that the scripts run.
    Run the following script and replace the text yourdomain.com with your url:

    http://www.yourdomain.com/cgi-bin/aplusdownload/scripts/test.cgi

    If it works then you know the cgi scripts are working otherwise one needs to check any of the following: a. file permissions, b. uploaded as ascii, c. perl path at the top of the script and d. the cgi-bin is configured to run cgi scripts.

    We find many times that the cgi-bin is not properly configured by the hosting company. In this case one needs to contact them and ask them for help to get this test script to work.

  9. Test that the required perl modules are installed..
    Run the following script and replace the text yourdomain.com with your url:

    http://www.yourdomain.com/cgi-bin/aplusdownload/scripts/testmods.cgi


    If any of the 3 Perl Modules are not found: LWP, Crypt::SSLeay or Digest::MD5 - Digest::MD5 then one needs to contact their hosting company to install them.

  10. Rename admin_menu_install.htm to admin_menu.htm
    ftp to /cgi-bin/aplusdownload/templates and rename the file admin_menu_install.htm to admin_menu.htm.

  11. Create MySQL Database
    Create a MySQL database. This may be created for you already from your web hosting company.

  12. Run the install script
    The install script will setup the MySQL, admin username and password and required paramters. After the install there will be a link to the admin web panel where you can go over the parameters set and start adding your digital downloads to the MySQL database.

    Run the following script and replace the text yourdomain.com with your url:

    http://www.yourdomain.com/cgi-bin/aplusdownload/install/install.cgi

  13. Add file data to the mySQL database
    Add your files to the database using the Cart Manager, test the download of the files by accessing testdownload.htm, reate the HTML Form in order to download the file then test the download of the file.

  14. Test the download of a file
    CONTINUE ON STEP 8 FROM THE MENU ON THE LEFT. WHEN ALL IS FINISHED YOU MUST COME BACK READ THE LAST STEP 14. ABOUT DELETING THE INSTALLATION FILES.

  15. Final Step
    WHEN EVERYTHING IS DONE AND THE PROGRAM IS WORKING IT IS ESSENTIAL THAT THE FOLLOWING DELETIONS ARE CARRIED OUT:
    1. DELETE the folder: install eg. /cgi-bin/aplusdownload/install
    2. DELETE admin_menu.htm but keep a backup on your desktop computer of admin_menu_install.htm for future need.
    3. RENAME admin_menu_original.htm. to admin_menu.htm. Note that admin_menu_original.htm does not have the links to the configuration parameter files.
    4. DELETE testmods.cgi and test.cgi .