JDT

 

John Dixon
Technology
Limited

 
Google

Earnings Tracker Installation Guide

Earnings Tracker is a web-based application and, therefore, needs to be installed on a web server. The application is written in HTML and PHP 4.x, and uses MySQL as the database server, and should run comfortably on any current PHP/MySQL implementations (PHP 4.x and MySQL 4.x onwards).

Before you can install Earnings Tracker you first need to download it. Go to the download page for access to the latest version of the application.

Having downloaded the zip file, unzip it.

As with many applications, Earnings Tracker comprises quite a few files. Fortunately, only two of them needs to be edited: classes.php and db_setup_v5.sql. Earnings Tracker has been written using a very simple object-oriented approach, with pretty much all of the processing done by the classes.php file.

classes.php

If you open classes.php using a suitable text editor, you'll see a section towards the top of the file that looks like:

     function Spreadsheet() {
       $this->dbHost = 'enter the database host name here';
       $this->dbUser = 'enter the database username here';
       $this->dbName = 'enter the database name here';
       $this->dbPass = 'enter the database password here';
       $this->dbUserTable = 'user_v3';
       $this->dbSpreadsheetTable = 'spreadsheet_v3';
       $this->dbSalaryTable = 'salary_v3';
       $this->dbYearTable = 'year_v3';
       $this->dbColumnTable = 'display_columns';
       $this->dbDividendTable = 'dividend_payments';
       }

The bits that read 'enter the ... here' are the bits you need to complete. (Do not edit anything else otherwise the application won't work.)

If you are planning to install Earnings Tracker on a web server installed on your own (local) computer you will probably know already what these pieces of information are. In this situation, the database host name will almost certainly be 'localhost', the database username will quite possibly be 'root', and the database name and password will be whatever you have set them to. If you do not yet have a database set up, the db_setup_v5.sql file (see below) suggests that you use 'spreadsheet', but you can use whatever you want to.

If you plan to install Earnings Tracker on a web server controlled by someone else, you will need to get the bits of information from them. In this situation, they will probably have set up a database for you, and will probably have allocated a database username and password for you.

Once you have edited the file, save it (make sure the name stays as classes.php).

Upload/Copy Files to Web Server

Next, upload/copy all the files and subdirectories (except db_setup_v5.sql) to your web server. In order to keep all the Earnings Tracker files in an easily-identifiable area on your web server, you should create a folder (for example, EarningsTracker) into which you upload/copy all the files.

db_setup_v5.sql

db_setup_v5.sql is a file that contains the instructions to create the database tables used by Earnings Tracker.

Open the file with a text editor.

You'll see at the top of the file the line 'CREATE DATABASE spreadsheet;'. If you want/need to use a database that already exists, which would probably be the case if someone else has set up the database for you, remove this line and edit the second line in the file ('use spreadsheet;') so that it refers to the name of the database you want/need to use.

Alternatively, if you have not yet set up a database, you can leave both lines as they are if you want to, or you can change them to something else.

If you are using a database editor, for example, phpMyAdmin, you can remove both of these lines from the db_setup_v5.sql file, as phpMyAdmin will already know what the name of your database is.

Save the file (keeping the name as db_setup_v5.sql).

You now need to run db_setup_v5.sql to create the database (possibly - depending on how you have edited the file) and the database tables.

If you are using a database editor such as phpMyAdmin, copy and paste the contents of db_setup_v5.sql into the SQL area and run the script to create the tables (the database will already exist).

If you are using a web server installed on your local computer, you can copy the file into the mysql/bin directory and run the file from within a command window, for example:

     mysql -u dbuser -p < db_setup_v5.sql

Upgrading from Earnings Tracker v4.0 to v5.1

Earnings Tracker v4.0 uses a subset of the database tables and fields used by v5.1. You can upgrade to v5.1 without losing any of your v4.0 data.

To upgrade to v5.1:

  1. To be on the safe side, back up all of your existing Earnings Tracker files - this includes all of the application files (for example, classes.php) and all of the database files. If you have installed Earnings Tracker on a local drive, the database files will be typically located in a directory such as: c:\wamp\mysql\data\spreadsheet. If you have installed Earnings Tracker on a remote database server, you will probably be able to back up the complete database using admin tools provided by your hosting provider.
  2. Download and unzip the v5.1 zip file.
  3. Modify the bits towards the top of classes.php (see above), and overwrite your existing Earnings Tracker v4.0 application files with the v5.1 files.
  4. In a text editor, open upgrade_v4_to_v5.sql, and change the name of the database at the top of the file (if necessary).
  5. Run upgrade_v4_to_v5.sql to update the database tables for v5.1. See the instructions about db_setup_v5.sql, above, for help on how to run upgrade_v4_to_v5.sql.

Upgrading from Earnings Tracker v5.0 (beta) to v5.1

Version 5.0 was released as beta software in November 2008. In November's pre-budget report, the Chancellor announced that the rate of VAT would be reduced from 17.5% to 15%. As the VAT rate was hardcoded into the classes.php file in Earnings Tracker, we quickly made an upgrade to the product, allowing the VAT rate to be manually set in the software. To distinguish this new version from the beta version, we called it Version 5.1.

If you downloaded and installed the beta version, you need to change the software so that the VAT rate used in calculations is 15% rather than 17.5%. You can do this by simply editing the classes.php file (in a text editor), changing the two occurrences of .175 to .15.

Alternatively, you can upgrade your beta version to Version 5.1. To do this:

  1. Download the Version 5.1 zip file and extract the following files:
    • classes.php
    • welcome.htm
    • nav.php
    • index.htm
    • bottom.htm
    • salary.php
    • help/static.htm
    • help/reference.htm
  2. Overwrite your Version 5.0 beta files with these new ones (remember to change the database stuff at the top of classes.php - see above)
  3. Run the following sql commands to add a new field to one of the database tables:

alter table salary_v3
add vat_rate float(8,2) not null after grs_salary;

update salary_v3 set vat_rate='15';

php.ini

In most situations, the php.ini file will be already configured to be able to handle Earnings Tracker. However, we have found that from time to time, a couple of settings need to be amended. If have access to the php.ini file, ensure that the following configuration parameters are set accordingly. If you do not have access to the php.ini file, we would recommend using the online version of Earnings Tracker.

Language Options

In Language Options, change:

short_open_tag = Off

to:

short_open_tag = On

Error handling and logging

Error handling and logging should be set to:

error_reporting = E_ALL & ~E_NOTICE




We want you to get the most out of Earnings Tracker. If you are having problems with the installation procedure, please contact us and we'll try our best to get you up and running.



Go back to Earnings Tracker User Guides home page

 







JDT

© 2007-2009 - John Dixon Technology Ltd

Privacy Statement

Terms & Conditions