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

Time Tracker Configuration Parameters

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

MULTITORG_MODE defines whether users see the Register option in the menu of Time Tracker that allows them to self-register and create new organizations (top groups).
// MULTIORG_MODE option defines whether users can create their own top groups (organizations).
// When false, a Time Tracker server is managed by admin, who creates top groups (one or many).
//
// Available values are true or false.
//
define('MULTIORG_MODE', true);
MULTITORG_MODE defines whether the "Register" menu is available
MULTITORG_MODE defines whether the "Register" menu is available


EMAIL_REQUIRED

EMAIL_REQUIRED, when true, makes an email field mandatory for new self-registrations.
// EMAIL_REQUIRED defines whether an email is required for new registrations.
define('EMAIL_REQUIRED', false);

DIR_NAME

DIR_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.
// Directory name.
// If you install time tracker into a sub-directory of your site reflect this in the DIR_NAME parameter.
// For example, for http://localhost/timetracker/ define DIR_NAME as 'timetracker'.
//
// define('DIR_NAME', 'timetracker');
//
define('DIR_NAME', '');

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);
//
// Note: see also PHP_SESSION_PATH below as you may have to use it together with
// PHPSESSID_TTL to avoid premature session expirations.

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 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 are names of 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.

LANG_DEFAULT

LANG_DEFAULT defines Time Tracker default language. It is used on Time Tracker login page. After login, a language set for user group is used.
// 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 groups.
// 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',
  'user_login_attribute' => 'uid',  
  'default_domain' => 'example.com',
  'member_of' => array());

DEBUG

DEBUG option can help with troubleshooting as it prints diagnostics and error information on pages. For example, you may wish to use it if LDAP authentication or mail is not working. Enabling DEBUG breaks redirects as debug output is printed before setting redirect header. Do not enable on production systems.
// define('DEBUG', false); 

Monthly Quotas Plugin Parameters

// Group managers can set monthly work hour quota for years between the following values.
// define('MONTHLY_QUOTA_YEAR_START', 2010); // If nothing is specified, it falls back to 2015.
// define('MONTHLY_QUOTA_YEAR_END', 2025); // If nothing is specified, it falls back to 2030.

NOTE_INPUT_HEIGHT

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

DEFAULT_PLUGINS

// A comma-separated list of default plugins for new group registrations.
// Example below enables charts and attachments.
// define('DEFAULT_PLUGINS', 'ch,at');

Time Tracker Install Guide