WR Time Tracker is a simple, easy to use, open source, web-based time tracking system. It features multiple teams with multiple people tracking time on multiple projects to multiple clients. Individuals can login and track their time. Management can then aggregate this time and print invoices.

http://wrconsulting.com/cms/wrtimetracker/

Installation instructions - WRTimeTracker v0.7 (8.04 Hardy Heron):

Preconditions:

Install the Ubuntu LAMP stack

sudo tasksel install lamp-server (https://help.ubuntu.com/community/ApacheMySQLPHP) 

Install PEAR and PEAR:DB

sudo aptitude install php-pear php-db

Initial setup:

1. Download wrtimetracker.zip from http://wrconsulting.com/downloads/wrtimetracker.zip

wget http://wrconsulting.com/downloads/wrtimetracker.zip

2. Copy wrtimetracker.zip to /var/www/

sudo cp wrtimetracker.zip /var/www/

3. Unzip wrtimetracker.zip

sudo unzip wrtimetracker.zip

WRTimeTracker is not compatible with the default version of PHP in Hardy Heron. This can be fixed by updating some of the WRTimeTracker code.

4. Make sure you are in /var/www/timetracker/

cd /var/www/timetracker/

5. Make /var/www/timetracker/WEB-INF/template_c/ world writeable.

  • Template_c holds the compiled smarty templates. Making this directory world writeable is a security concern, but is required for a functional WRTimeTracker install. Hopefully this will no longer be required in a future release. See below for a small fix.

sudo chmod 777 /var/www/timetracker/WEB-INF/template_c/

6. Find and Replace all of the references to DateTime with DateTimeOld.

sudo perl -p -i -e "s/DateTime\"/DateTimeOld\"/g" `grep -ril DateTime *`

sudo perl -p -i -e "s/DateTime\'/DateTimeOld\'/g" `grep -ril DateTime *`

sudo perl -p -i -e "s/DateTime\(/DateTimeOld\(/g" `grep -ril DateTime *`

sudo perl -p -i -e 's/DateTime /DateTimeOld/g' `grep -ril DateTime *`

sudo mv WEB-INF/lib/DateTime.class.php WEB-INF/lib/DateTimeOld.class.php

MySQL Database setup. The following commands should be issued inside of MySQL command line tool. ( mysql -u root -p )

7. Create a new database for WRTimeTracker.

CREATE DATABASE timetracker;

8. Create a user for WRTimeTracker to connect as. In this example - username:ttuser password:12345.

GRANT ALL ON timetracker.* TO 'ttuser'@'localhost' IDENTIFIED BY '12345';

9. Flush the privileges to ensure these changes are applied (old habits die hard).

FLUSH PRIVILEGES;

10. Exit out of mysql.

exit;

Now we should be back on the command line. We need to do some final edits and we can proceed.

11. Edit WRTimeTracker's config file to use our database settings, and path.

sudo vi /var/www/timetracker/WEB-INF/config.php
  • Change the line: define("DSN",'mysql://root:no@localhost/wrtts'); to read define("DSN",'mysql://ttuser:1234@localhost/timetracker'); This is our username and password from above.
  • Change the line: define("APP_NAME",); to read define("APP_NAME",'timetracker');

Save your changes and exit to the command line. Now we'll use a browser to finalize our database setup.

12. Open http://localhost/timetracker/dbinstall.php

  • Create database structure (v0.5).
  • Update database structure (v0.5 to v0.6).
  • Update database structure (v0.6 to v0.7).

That's it. You should have a working install of WRTimeTracker!

These steps aren't required, but the author recomends them

Backup

1. Backup the MySQL database.

  • This will export the database to a file named timetracker_db.sql in the /var/www/timetracker/ directory.

sudo mysqldump –-user=ttuser –-password=12345 timetracker > /var/www/timetracker/timetracker_db.sql

2. Backup the website

  • This will create a file named timetracker_0.7_changes.tgz. Save this file somewhere

tar -cvzf timetracker_0.7_changes.tgz /var/www/timetracker/

3. Delete the mysql dump.

  • Storing timetracker_db.sql where it is accessable to the web is ill-advised.

sudo rm /var/www/timetracker/timetracker_db.sql

Security

1. Delete dbinstall.php

  • DBInstall allows anyone to issue some very concerning commands to MySQL.

sudo rm /var/www/timetracker/dbinstall.php

2. Try to lock down templates_c.

  • This is untested and could cause you issues.

sudo chown -R www-data:www-data /var/www/timetracker/WEB-INF/templates_c/

sudo chmod 600 /var/www/timetracker/WEB-INF/templates_c/ 

WRTimeTracker (last edited 2011-05-17 00:09:44 by vpn-3173)