Home Contact Buy Now
Home Download Video Free Buy Now Site Map Contact

Time Tracker Configuration Values in config.php File

Time Tracker uses a configuration file named config.php in WEB-INF directory. When you download Time Tracker, there should be a file named config.php.dist. Configuring Time Tracker involves copying this file into config.php and setting your values in it as necessary.

The sections below describe what different configuration values do.

set_include_path

Sets the include_path configuration option for the script to use PEAR modules integrated with Time Tracker source code. These modules are located in WEB-INF/lib/pear. Do not change this option unless you want to use PEAR from another source.
// Set include path for PEAR and its modules, which we include in the distribution.
//
set_include_path(realpath(dirname(__FILE__).'/lib/pear') . PATH_SEPARATOR . get_include_path());

DSN

DSN string defines database connection parameters for Time Tracker. In it, you set username, password, and database name as fragments of the DSN string. Change all of them accordingly to make connection to your database possible.
// Database connection parameters.
//
// CHANGE 3 PARAMETERS HERE!
// In this example: "root" is username, "no" is password, "dbname" is database name.
//
define('DSN', 'mysqli://root:no@localhost/dbname?charset=utf8');
// Do NOT change charset unless you upgraded from an older Time Tracker where charset was NOT specified
// and now you see some corrupted characters. See http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html

MULTITEAM_MODE

The MULTITEAM_MODE defines whether users see the Create Team option in the menu of Time Tracker that allows them to create new teams.
// MULTITEAM_MODE option defines whether users can create their own teams.
//
// Available values are true or false.
// If true users can create their own teams.
// If false only admin can create teams.
//
define('MULTITEAM_MODE', true);
MULTITEAM_MODE defines whether the "Create Team" menu is available
MULTITEAM_MODE defines whether the "Create Team" menu is available


APP_NAME

APP_NAME string defines a sub-directory for Time Tracker installation on web server. Things like paths to images use it. Leave it empty if you install Time Tracker in the root directory.
// Application name.
// If you install time tracker into a sub-directory of your site reflect this in the APP_NAME parameter.
// For example, for http://localhost/timetracker/ define APP_NAME as 'timetracker'.
//
// define('APP_NAME', 'timetracker');
//
define('APP_NAME', '');

OLD_PASSWORDS

Use this option only if user passwords no longer work after migrating from an older version of Time Tracker.
// OLD_PASSWORDS
//
// You may need to set this option if you migrate an older version of TT installation to a new server.
// Older versions of TT used mysql password function to hash user passwords. Newer versions use md5.
// Because the password function may behave differently between servers, the OLD_PASSWORD settings
// gives you an opportunity to control it, if needed.
//  
// define('OLD_PASSWORDS', true);

SHOW_HOLIDAYS

This option defines whether holidays in calendar are highlighted with a different color.
// Holidays. At this time holiday days are defined in the localization files (one file per language).
// The SHOW_HOLIDAYS option defines whether holidays are highlighted with holiday color.
//
define('SHOW_HOLIDAYS', true);
The days are defined by the $i18n_holidays array in localization files in WEB-INF/resources directory (one file per language). This array needs an adjustment as holidays change year after year.

COST_ON_REPORTS

This option controls presence of the Cost field on the Reports page.
// COST_ON_REPORTS - defines the availability of the Cost field on the Reports page.
//
define('COST_ON_REPORTS', true);

READONLY_START_FINISH

READONLY_START_FINISH option controls whether regular users can type in any data they wish in the Start and Finish fields on time entry pages, or are forced to use the Now buttons to fill them.
// READONLY_START_FINISH - defines whether the start and finish fields on time entry pages are read-only.
// This applies to regular users only. Manager and co-managers can edit these values.
//
// define('READONLY_START_FINISH', false);

FUTURE_ENTRIES

Set FUTURE_ENTRIES to false to disallow users entering time and expenses for future dates. If you do so, users will see the Date is in the future error when trying to enter records for future dates. By default, future entries are allowed.
// FUTURE_ENTRIES - defines whether users can create entries for future dates. Defaults to true.
//
// define('FUTURE_ENTRIES', false);

ALLOW_OVERLAP

Set ALLOW_OVERLAP to true to allow overlapped time entries (when one time entry can overlap fully or partially with another). By default, overlapped entries are not allowed.
// ALLOW_OVERLAP - defines whether overlapping time entries are allowed. Defaults to false.
//
// define('ALLOW_OVERLAP', true);

WEEKEND_START_DAY

Defines the day of the week (0 is Sunday) when weekend starts.
// WEEKEND_START_DAY
//
// This option defines which days are highlighted with weekend color.
// 6 means Saturday. For Saudi Arabia, etc. set it to 4 for Thursday and Friday to be weekend days.
//
define('WEEKEND_START_DAY', 6);

PHPSESSID_TTL

Time to live in seconds for script session cookie (named tt_PHPSESSID).
// PHPSESSID_TTL
//
// Lifetime in seconds for tt_PHPSESSID cookie. Time to live is extended by this value
// with each visit to the site so that users don't have to re-login. 
// define('PHPSESSID_TTL', 86400);

FORUM_LINK and HELP_LINK

These values are http links to Time Tracker support forum and user guide.
// Forum and help links from the main menu.
//
define('FORUM_LINK', 'https://www.anuko.com/forum/viewforum.php?f=4');
define('HELP_LINK', 'https://www.anuko.com/time_tracker/user_guide/index.htm');

Mail Options

The options below define how mail is configured.
// Default sender for mail.
//
define('SENDER', '"Anuko Time Tracker" <no-reply@timetracker.anuko.com>');


// MAIL_MODE - mail sending mode. Can be 'mail' or 'smtp'.
// 'mail' - sending through php mail() function.
// 'smtp' - sending directly through SMTP server.
// See https://www.anuko.com/time_tracker/user_guide/mail.htm
//
define('MAIL_MODE', 'smtp');
define('MAIL_SMTP_HOST', 'localhost'); // For gmail use 'ssl://smtp.gmail.com' instead of 'localhost' and port 465.
// define('MAIL_SMTP_PORT', '465');
// define('MAIL_SMTP_USER', 'yourname@yourdomain.com');
// define('MAIL_SMTP_PASSWORD', 'yourpassword');
// define('MAIL_SMTP_AUTH', true);
// define('MAIL_SMTP_DEBUG', true);

CSS Files

DEFAULT_CSS and RTL_CSS strings are names CSS files used in Time Tracker. RTL_CSS is used for right-to-left languages.
// CSS files. They are located in the root of Time Tracker installation.
//
define('DEFAULT_CSS', 'default.css');
define('RTL_CSS', 'rtl.css'); // For right to left languages.

DATE_FORMAT_DEFAULT

Defines default date format.
// Default date format. Behaviour with not included formats is undefined. Possible values:
// '%Y-%m-%d'
// '%m/%d/%Y'
// '%d.%m.%Y'
// '%d.%m.%Y %a'
define('DATE_FORMAT_DEFAULT', '%Y-%m-%d');

TIME_FORMAT_DEFAULT

Defines default time format.
// Default time format. Behaviour with not included formats is undefined. Possible values:
// '%H:%M'
// '%I:%M %p'
define('TIME_FORMAT_DEFAULT', '%H:%M');

WEEK_START_DEFAULT

Defines default week start day.
// Default week start day.
// Possible values: 0 - 6. 0 means Sunday.
//
define('WEEK_START_DEFAULT', 0);

LANG_DEFAULT

Defines Time Tracker default language.
// Default language of the application.
// Possible values: en, fr, nl, etc. Empty string means the language is defined by user browser.
// 
define('LANG_DEFAULT', '');

CURRENCY_DEFAULT

Defines a default currency symbol for new teams.
// Default currency symbol. Use €, £, a more specific dollar like US$, CAD, etc.
// 
define('CURRENCY_DEFAULT', '$');

EXPORT_DECIMAL_DURATION

// EXPORT_DECIMAL_DURATION - defines whether time duration values are decimal
// in CSV and XML data exports (1.25 vs 1:15).
// 
define('EXPORT_DECIMAL_DURATION', true);

REPORT_FOOTER

// REPORT_FOOTER - defines whether to use a footer on reports.
// 
define('REPORT_FOOTER', true);

AUTH_MODULE

AUTH_MODULE option defines an authentication mechanism used in Time Tracker. The db option does not require any extra configuration parameters, but ldap does. See how to configure LDAP authentication.
// Possible authentication methods:
//   db - internal database, logins and password hashes are stored in time tracker database.
//   ldap - authentication against an LDAP directory such as OpenLDAP or Windows Active Directory.
define('AUTH_MODULE', 'db');

An example configuration for openldap.
$GLOBALS['AUTH_MODULE_PARAMS'] = array(
  'server' => '127.0.0.1',
  'type' => 'openldap',
  'base_dn' => 'ou=people,dc=example,dc=com',
  'default_domain' => 'example.com',
  'member_of' => array());

Time Tracker Install Guide