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.
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 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.
// 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
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.
MULTITEAM_MODE defines whether the "Create Team" menu is available
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');
Use this option only if user passwords no longer work after migrating from an older version of Time Tracker.
// 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);
This option is no longer in config.php since Time Tracker 1.17.14 and is replaced with the Show holdiays
checkbox in Team profile
. Instead of a global setting, it is now configurable by group managers.
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
// COST_ON_REPORTS - defines the availability of the Cost field on the Reports page.
This option is no longer in config file as of Time Tracker 1.17.21. It is replaced with a team-configurable Punch in mode
checkbox in Team profile
In versions 1.5.110 - 1.17.20 READONLY_START_FINISH globally controlled whether regular users could type in any data in the Start
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);
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);
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);
Defines the day of the week (0 is Sunday) when weekend starts.
// 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.
Time to live in seconds for script session cookie (named tt_PHPSESSID).
// 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);
Local file system path for PHP sessions.
// 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.
The options below define how mail
// Default sender for mail.
define('SENDER', '"Anuko Time Tracker" <email@example.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_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', 'firstname.lastname@example.org');
// define('MAIL_SMTP_PASSWORD', 'yourpassword');
// define('MAIL_SMTP_AUTH', true);
// define('MAIL_SMTP_DEBUG', true);
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('RTL_CSS', 'rtl.css'); // For right to left languages.
Defines default date format.
// Default date format. Behaviour with not included formats is undefined. Possible values:
// '%d.%m.%Y %a'
Defines default time format.
// Default time format. Behaviour with not included formats is undefined. Possible values:
// '%I:%M %p'
Defines default week start day.
// Default week start day.
// Possible values: 0 - 6. 0 means Sunday.
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.
Defines a default currency symbol for new teams.
// Default currency symbol. Use €, £, a more specific dollar like US$, CAD, etc.
// EXPORT_DECIMAL_DURATION - defines whether time duration values are decimal
// in CSV and XML data exports (1.25 vs 1:15).
// REPORT_FOOTER - defines whether to use a footer on reports.
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.
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());
// Height in pixels for the note input field in time.php. Defaults to 40.
// define('NOTE_INPUT_HEIGHT', 100);
This option was introduced in Time Tracker 1.17.22 as a temporary measure
to disallow co-managers editing Team profile
. It is currently checked for defined
only in profile_edit.tpl, meaning that false value here means the same thing. This option will be removed in future after user roles and rights / permissions are redesigned.
// define('MANAGER_ONLY_TEAM_SETTINGS', true);
Time Tracker Install Guide