Introduction:

This document contains instructions on how to configure and install the
downloaded Perl application. It assumes that:

1. You have some basic knowledge of server and database technologies.
2. You have a web server where the application will be deployed and if
   applicable, a database server as well.
3. That your web server is capable of serving the web pages of the script
   language in which the application is written, in this case Perl.

When you download the application, you should find the following components
contained in the zip archive:
 
1. Language specific script files and html template files if you downloaded the
   template version.
2. A database file or a SQL script file that can be used to recreate the
   database.
3. A folder containing images if applicable.

Installation:

The installation process is pretty straightforward and requires minimal
adjustment of the application files. Proceed as follows:

1. Unzip the files into a folder within your web server hierarchy from where
   the application will be served. Ensure that the folder name does not have
   spaces in it. During the process of unzipping, make sure that the files are
   unzipped to their respective folders. Don't simply open the zip archive and
   drag all the files to the same folders. For the application to work
   correctly, some files such as the image files need to be in specific folders.

2. Once you have unzipped the files, the next task is to setup the database and
   configure database access from the application. 

Database Setup

You can either create a new database for the application or use the existing
one. To create a new database use the appropriate database tools (refer to your
database documentation) and SQL script from the downloaded zip archive. SQL
scripts include all statements necessary for the database structure creation 
and the initial data.

Database Connection Configuration

Perl scripts use DBI module to access a database. Make sure that you have
the DBI module and the appropriate DBD driver installed on your system.
Otherwise, install them now according to Perl documentation.

To configure connection in the application:
(a) Open the file 'Common.pm' which is in the main folder of your application
    path.
(b) Look for the database connection parameters:

$strConn = "";
$strLogin = "";
$strPassword = "";

(c) Using the guidelines below, change these parameters:

$strConn = "DBI:dbd-driver-name:db-name"

where:

dbd-driver-name - This is the name of the used DBD driver. E.g., in MySQL case
it should be 'MySQL' and the whole connection string will have the following
look:

$strConn = "DBI:MySQL:db-name";

db-name: This is the name of the used database.

Thus, if your database name is "mydb" (and you use MySQL), you should have the
following connection string:

$strConn = ""DBI:MySQL:mydb";

(d) If you use the authentication for your database, modify the following two
lines below the connection string statement and set the values accordingly:

$strLogin = "username";
$strPassword = "password".

3. Check the pathname to perl interpreter.
The first line of each script contains the full pathname of a Perl
interpreter. 

For Windows:
#!\Perl\bin\perl.exe

For Unix:
#!\usr\bin\perl

If you have a Perl interpreter not residing in the default folders,
modify the pathnames in each script accordingly.

4. Setup file permissions (for Unix only).

a) Go to the application folder
b) Setup the permissions for *.cgi files: 

chmod 755 *.cgi

c) Setup the permissions for *.pm files:
Create .htaccess file in the application folder and place the following
lines there:

<Files *.pm>
Order Allow, Deny
Deny from All
</Files>

d) Make sure that the session files can be created.
Your application will need a folder for session files created under the
application folder. The necessary permissions should be set. Otherwise,
you should manually create a folder named "session_files". Additionally
the application uses this folder to create/read/write files.