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=utf8mb4');
// 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

MULTITORG_MODE

The MULTITORG_MODE defines whether users see the Create Team option in the menu of Time Tracker that allows them to create new teams.
// MULTITORG_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('MULTITORG_MODE', true);
MULTITORG_MODE defines whether the "Create Team" menu is available
MULTITORG_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', '');

COST_ON_REPORTS

This option is no longer in config file since Time Tracker 1.17.21. In versions 1.5.96 - 1.17.20, this option controlled the 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

This option is no longer in config file as of Time Tracker 1.17.21. It is replaced with a group-configurable Punch mode checkbox in Group settings.

In versions 1.5.110 - 1.17.20 READONLY_START_FINISH globally controlled whether regular users could type in any data in the Start and Finish fields on time entry pages, or were 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

This option is no longer in config file as of Time Tracker 1.17.20. It is replaced with a team-configurable Future entries checkbox in Team profile.

In versions 1.7.7 - 1.17.20 FUTURE_ENTRIES was used globally to either allow or disallow users entering time and expenses for future dates. When disabled, users saw the Date is in the future error when trying to enter records for future dates. By default, future entries were allowed.
// FUTURE_ENTRIES - defines whether users can create entries for future dates. Defaults to true.
//
// define('FUTURE_ENTRIES', false);

ALLOW_OVERLAP

This option is no longer in config file as of Time Tracker 1.17.18. It is replaced with a team-configurable Allow overlap checkbox in Team profile.

Before version 1.17.18, ALLOW_OVERLAP was used globally to allow overlapped time entries (when one time entry can overlap fully or partially with another). By default, overlapped entries were 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);

PHP_SESSION_PATH

Local file system path for PHP sessions.
// PHP_SESSION_PATH
//
// Local file system path for PHP sessions. Use it to isolate session deletions
// (garbage collection interference) by other PHP scripts potentially running on the system.
// define('PHP_SESSION_PATH', '/tmp/timetracker'); // Directory must exist and be writable.

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

This option is no longer in config file as of Time Tracker 1.19.9. Date format for a group is configured on the group edit page.

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

This option is no longer in config file as of Time Tracker 1.19.9. Time format for a group is configured on the group edit page.

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

This option is no longer in config file as of Time Tracker 1.19.9. Week start day for a group is configured on the group edit page.

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());

NOTE_INPUT_HEIGHT

// Height in pixels for the note input field in time.php. Defaults to 40.
// define('NOTE_INPUT_HEIGHT', 100);

Time Tracker Install Guide