Installing Rodeo Time Reporting System

Prerequisites

Perl with DBI installed (DBD::ODBC or DBD::MYSQL additional modules installed too)
MySql or MS SQL
Webserver (Apache or IIS)

Setting up the database

In the file rodeo_db.pl set the variable $MYSQL to 0 or 1 according to if the system is using MySQL or MS SQL. Change the variable $DSN to the name of the database or ODBC-connection (create a system DSN first if you are using ODBC). Set $opt_user and $opt_password. Set the variable $host to the name of the mysql-host

Example: script-segment

# database settings
my $MYSQL = 0;
my $DSN = 'rodeo';
my $host = 'localhost';
my $opt_user = 'sa' ;
my $opt_password = 'summer' ;

run the script in a terminal with

>perl rodeo_db.pl s
>perl rodeo_db.pl y 2005

which creates the tables. The reports is saved in one table for each year so you may need to create tables for succeding years later, i.e.

>perl rodeo_db.pl y 2006...

Installing the script

The variable $RELPATH is the location of the images, stylesheets and javascript-files relative to the location of rodeo.pl. Like if the script is in /cgi-bin and the rest of the files in the default webfolder htdocs/, the relative path is '..' (which is default). If all the files are placed i n the same location the path should be set to '.'.

Set up in Apache

put rodeo.pl in the cgi-bin/ folder and the rest of the files in htdocs/

some variables in rodeo.pl needs to be modified

the top line should point to where perl is installed
i.e. in Linux

#! /usr/bin/perl

on Windows

#! c:\perl\bin\perl

$MYSQL, $DSN, $optuser, $optpassword as above... also set $superuser_password.

browse to /cgi-bin/rodeo.pl

login as superuser in the manage projects.

Create a new invoice manager, logout and login as that user and set up the rest of the users, customers and projects...

Set up in IIS

pack up the zip in a folder rodeo/ (modify variables in script according to instructions above) Create a virtual directory to /rodeo browse to /rodeo and login as superuser

Appendix - setting up Perl on Windows

Install the Activestate distribution, www.activestate.com

To install necessary database modules, DBI, run ppm.bat, which is found in the perl\bin folder

>install DBI

>install DBD::ODBC

>install DBD::MYSQL

Configure Perl Script Mapping for IIS

Click Start , click Programs , click Administrative Tools , and then click Internet Information Services .

Right-click a Web site that you want to enable PERL for, and then click Properties .

Click the Home Directory tab.

Click Configuration .

Click Add .

Type the following for Executable : full path to perl.exe
c:\perl\bin \perl.exe %s %s
NOTE : The "%s %s" is case-sensitive (for example, "%S %S" does not work).

For Extension , type .pl
NOTE : Make sure that the All Verbs option is selected for full functionality, and that the Script Engine check box is selected.