* TestLink Open Source Project - http://testlink.sourceforge.net/
* This script is distributed under the GNU General Public License 2 or later.
* Constants and configuration parameters used throughout TestLink
* There are included extra files:
* - your customized settings - custom_config.inc.php
* - DB access - config_db.inc.php
* - constants - const.inc.php
* - basic checking - configCheck.php
* To adapt values to your needs DO NOT EDIT THIS FILE but use custom_config.inc.php and
* replace values of TestLink configuration variables.
* It saves your changes for the next upgrade in one extra file.
* @filesource config.inc.php
* @copyright 2005-2018, TestLink community
* @link http://www.testlink.org
// ----------------------------------------------------------------------------
/* [INITIALIZATION] - DO NOT CHANGE THE SECTION */
/** @global array Global configuration class */
$tlCfg->api = new stdClass();
$tlCfg->cookie = new stdClass();
$tlCfg->document_generator = new stdClass();
$tlCfg->spec_cfg = new stdClass();
$tlCfg->exec_cfg = new stdClass();
$tlCfg->exec_cfg->view_mode = new stdClass();
$tlCfg->exec_cfg->exec_mode = new stdClass();
$tlCfg->UDFStripHTMLTags = true;
// allow to define additional execution types other than
// defined in testcase.class.php
// code int value > latest standard execution code defined.
// lblkey => key to be used on lang_get() call.
$tlCfg->custom_execution_types = null;
$tlCfg->gui = new stdClass();
$tlCfg->gui->custom_fields = new stdClass();
$tlCfg->testcase_cfg = new stdClass();
$tlCfg->req_cfg = new stdClass();
$tlCfg->validation_cfg = new stdClass();
$tlCfg->custom_fields = new stdClass();
$tlCfg->req_spec_cfg = new stdClass();
$tlCfg->diffEngine = new stdClass();
$tlCfg->tplanDesign = new stdClass();
$tlCfg->notifications = new stdClass();
$tlCfg->proxy = new stdClass();
$tlCfg->reqTCLinks = new stdClass();
$tlCfg->keywords = new stdClass();
$tlCfg->keywords->onDeleteCheckFrozenTCVersions = TRUE;
$tlCfg->keywords->onDeleteCheckExecutedTCVersions = TRUE;
// main key testproject PREFIX
// 'addTCLinkIntoITS' true => add note to Issue Tracker to issue with
// ISSUE ID similar to the KEYWORD (see kwPrefix below)
// 'kwPrefix' to remove from keyword to create the ISSUE ID
$tlCfg->keywords->byTestProject = array();
$tlCfg->keywords->headsUpTSuiteOnExec = 'CMD_OPEN_ON_EXEC';
$tlCfg->accessWithoutLogin = array();
/** @uses database access definition (generated automatically by TL installer) */
@include_once('config_db.inc.php');
if( !defined('DB_TABLE_PREFIX') ) {
define('DB_TABLE_PREFIX','' );
/** The root dir for the testlink installation with trailing slash */
define('TL_ABS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
/** Just for documentation */
$tlCfg->testlinkdotorg = 'http://www.testlink.org';
/** GUI themes (base for CSS and images)- modify if you create own one */
$tlCfg->theme_dir = 'gui/themes/default/';
/** Dir for compiled templates */
$tlCfg->temp_dir = TL_ABS_PATH . 'gui' . DIRECTORY_SEPARATOR .
'templates_c' . DIRECTORY_SEPARATOR;
if (($tpltmp = getenv('TESTLINK_TEMPLATES_C'))) {
$tlCfg->temp_dir = trim($tpltmp);
/** default filenames of CSS files of current GUI theme */
define('TL_CSS_MAIN', 'testlink.css');
define('TL_CSS_PRINT', 'tl_print.css');
define('TL_CSS_DOCUMENTS', 'tl_documents.css');
define('TL_THEME_BASE_DIR', $tlCfg->theme_dir);
define('TL_THEME_IMG_DIR', $tlCfg->theme_dir . 'images/');
define('TL_THEME_CSS_DIR', $tlCfg->theme_dir . 'css/');
define('TL_TESTLINK_CSS', TL_THEME_CSS_DIR . TL_CSS_MAIN);
define('TL_PRINT_CSS', TL_THEME_CSS_DIR . TL_CSS_PRINT);
// name of your custom.css, place it in same folder that standard TL css
// null or '' => do not use
$tlCfg->custom_css = null;
/** Include constants and magic numbers (users should not change it)*/
require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
// ----------------------------------------------------------------------------
/** @var string used to have (when needed) a possibility to identify different TL instances
@since 1.9.4 used on mail subject when mail logger is used
$tlCfg->instance_name = 'Main TestLink Instance';
// do not use blanks or special characters, use a short string
$tlCfg->instance_id = 'TLM';
$tlCfg->gui->ux = 'tl-classic';
* Prefix for all TestLink cookies
* This should be an identifier which does not include spaces or periods,
* and should be unique per TestLink installation, especially if
* $tlCfg->cookie_path is not restricting the cookies' scope to the actual
* @see $tlCfg->cookie->path
* @global string $tlCfg->cookie->prefix
$tlCfg->cookie->prefix = 'TESTLINK1920';
* @link http://php.net/function.setcookie
$tlCfg->cookie->expire = (time()+60*60*24*30); // 30 days;
$tlCfg->cookie->domain = '';
$tlCfg->cookie->secure = false;
$tlCfg->cookie->httponly = false;
$tlCfg->cookie->testProjectMemory = $tlCfg->cookie->prefix .
* Specifies the path under which a cookie is visible
* All scripts in this directory and its sub-directories will be able
* to access TestLink cookies.
* It is recommended to set this to the actual TestLink path.
* @link http://php.net/function.setcookie
* @global string $tlCfg->cookie->path
$tlCfg->cookie->path = '/';
* till a role is specifically assigned to test plan, test plan role
* will be inherited from test project role.
* test project role can be specifically assigned or inherited from
* if test project specifically assigned role changes, and test plan role was inherited, then it will also changes, due to inheritance.
* till a role is specifically assigned to test plan, test plan role
* will be inherited from user's global role, and NOT from test project
* specifically assigned role.
* if test project specifically assigned role changes, will not be changed.
$tlCfg->testplan_role_inheritance_mode = 'testproject';
/** @var string Default localization for users */
// The value must be available in $$tlCfg->locales (see cfg/const.inc.php).
// Note: An attempt will be done to establish the default locale
// automatically using $_SERVER['HTTP_ACCEPT_LANGUAGE']
$tlCfg->default_language = 'en_GB';
* @var string Charset 'UTF-8' is only officially supported charset (Require
* MySQL version >= 4.1) 'ISO-8859-1' or another Charset could be set for
* backward compatability by experienced users. However we have not resources
* to support such patches.
$tlCfg->charset = 'UTF-8';
* @var string characters used to surround a description in the user interface
$tlCfg->gui_separator_open = '[';
$tlCfg->gui_separator_close = ']';
$tlCfg->gui_room = '[ %s ]';
/** @var string Title separators are used when componing an title using several strings */
$tlCfg->gui_title_separator_1 = ' : '; // object : name (Test Specification : My best product)
$tlCfg->gui_title_separator_2 = ' - '; // parent - child
* @var string delimiter used to create DOC ID in this way:
* <test_project_Prefix> . g_testcase_cfg->glue_character . <doc_id>
$tlCfg->testcase_cfg->glue_character = '-';
* fonts set used to draw charts
$tlCfg->charts_font_path = TL_ABS_PATH . "third_party/pchart/Fonts/tahoma.ttf";
* font size used to draw charts
$tlCfg->charts_font_size = 8;
// ----------------------------------------------------------------------------
/* [SERVER ENVIRONMENT] */
* TICKET 4969: Add Setting to Force HTTPS
$tlCfg->force_https = false;
* @var integer Set the session timeout for inactivity [minutes].
* Default high value disables this feature.
$tlCfg->sessionInactivityTimeout = 9900;
* Set the session timeout value (in minutes).
* This will prevent sessions timing out after very short periods of time
* Warning: your server could block this settings
//ini_set('session.cache_expire',900);
* Set the session garbage collection timeout value (in seconds)
* The default session garbage collection in php is set to 1440 seconds (24 minutes)
* If you want sessions to last longer this must be set to a higher value.
* You may need to set this in your global php.ini if the settings don't take effect.
//ini_set('session.gc_maxlifetime', 60*90);
$tlCfg->notifications->userSignUp = new stdClass();
$tlCfg->notifications->userSignUp->enabled = TRUE; // @see notifyGlobalAdmins()
$tlCfg->notifications->userSignUp->to = new stdClass();
$tlCfg->notifications->userSignUp->to->roles = array(TL_ROLES_ADMIN);
$tlCfg->notifications->userSignUp->to->users = null; // i.e. array('login01','login02');
// ----------------------------------------------------------------------------
/** Error reporting - do we want php errors to show up for users */
/** configure on custom_config.inc.php */
/** error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING); */
/** error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); */
/** @var string Default level of logging (NONE, ERROR, INFO, DEBUG, EXTENDED)
* is not used by tlLogger, we need to change this in future.
$tlCfg->log_level = 'ERROR';
/** @var boolean show smarty debug window */
$tlCfg->smarty_debug = false;
* @var string Path to store logs -
* for security reasons (see http://itsecuritysolutions.org/2012-08-13-TestLink-1.9.3-multiple-vulnerabilities/)
* put it out of reach via web or configure access denied.
$tlCfg->log_path = '[[softpath]]/logs/'; /* unix example */
if (($lp = getenv('TESTLINK_LOG_PATH'))) {
$tlCfg->log_path = trim($lp);
* @var string How to warning user when security weak points exists.
* 'SCREEN': messages will displayed on login screen, and tl desktop
* 'FILE': a file with a list is created but users are not notified via GUI
* user will receive a message on screen. (default)
* 'SILENT': same that FILE, but user will not receive message on screen.
$tlCfg->config_check_warning_mode = 'SILENT';
$tlCfg->config_check_warning_frequence = 'ONCE_FOR_SESSION';
$tlCfg->userDocOnDesktop = OFF;
* Configure if individual logging data stores are enabled of disabled
* Possibile values to identify loggers: 'db','file'
* $g_loggerCfg=null; all loggers enabled
* $g_loggerCfg['db']['enable']=true/false;
* $g_loggerCfg['file']['enable']=true/false;
* $g_loggerCfg['mail']['enable']=true/false;
$g_loggerCfg = array('mail' => array('enable' => false));
/** @var integer All events older this value [days] are removed from the db, during login */
$g_removeEventsOlderThan = 30;
/** @var map keys: 'all' + values present on proprety of logger class $loggerTypeDomain
* values can be only these defined on logger.class.php
* example array('all' => array('INFO','AUDIT'),
* 'mail' => array('ERROR'))
* $tlCfg->loggerFilter = array('db' => array('DEBUG','AUDIT','WARNING','ERROR'),
* 'file' => array('NONE'));
$tlCfg->loggerFilter = null; // default defined on logger.class.php ;
// ----------------------------------------------------------------------------
* @var string SMTP server name or IP address ("localhost" should work in the most cases)
* Configure using custom_config.inc.php
* @uses lib/functions/email_api.php
$g_smtp_host = '[smtp_host_not_configured]'; # SMTP server MUST BE configured
# Configure using custom_config.inc.php
$g_tl_admin_email = '[testlink_sysadmin_email_not_configured]'; # for problem/error notification
$g_from_email = '[from_email_not_configured]'; # email sender
$g_return_path_email = '[return_path_email_not_configured]';
* Email notification priority (low by default)
* Urgent = 1, Not Urgent = 5, Disable = 0
* Taken from mantis for phpmailer config
* select the method to mail by:
* PHPMAILER_METHOD_MAIL - mail()
* PHPMAILER_METHOD_SENDMAIL - sendmail
* PHPMAILER_METHOD_SMTP - SMTP
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
/** Configure only if SMTP server requires authentication */
$g_smtp_username = ''; # user
$g_smtp_password = ''; # password
* This control the connection mode to SMTP server.
* @global string $g_smtp_connection_mode
$g_smtp_connection_mode = '';
* The smtp port to use. The typical SMTP ports are 25 and 587. The port to use
* will depend on the SMTP server configuration and hence others may be used.
* @global int $g_smtp_port
* @see https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
// ----------------------------------------------------------------------------
/* [User Authentication] */
* Login authentication method:
* 'MD5' => use password stored on db => will be deprecated and DB used.
* 'DB' => Same as MD5 use password stored on db
* 'LDAP' => use password from LDAP Server
$tlCfg->authentication['domain'] = array('DB' => array('description' => 'DB', 'allowPasswordManagement' => true) ,
'LDAP' => array('description' => 'LDAP', 'allowPasswordManagement' => false) );
/* Default Authentication method */
$tlCfg->authentication['method'] = 'DB';
// Applies only if authentication methos is DB.
// null => only check password IS NOT EMPTY
// $tlCfg->passwordChecks = array('minlen' => 8,'maxlen' => 20,'number' => true,'letter' => true,
// 'capital' => true, 'symbol' => true);
$tlCfg->passwordChecks = null;
// Applies ONLY to the HTML input.
// If auth method is DB, password will be stored as MD5 HASH that requires 32 chars (128 bits)
$tlCfg->loginPagePasswordMaxLenght = 40;
* Standard logout url, used also when SSO is used and hint to skip SSO is used.
* '' => use standard TestLink page
// users that will not allow expiration date management on GUI
$tlCfg->noExpDateUsers = array('admin');
* Configure this on custom_config.inc.php
$tlCfg->OAuthServers = array();
// $tlCfg->OAuthServers = array();
// $tlCfg->OAuthServers[1]['oauth_enabled'] = true;
// $tlCfg->OAuthServers[1]['oauth_name'] = 'google';
// Get from /gui/themes/default/images
// $tlCfg->OAuthServers[1]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[1]['oauth_client_secret'] = 'CLIENT_SECRET';
// Can be authorization_code (by default), client_credentials or password
// $tlCfg->OAuthServers[1]['oauth_grant_type'] = 'authorization_code';
// $tlCfg->OAuthServers[1]['oauth_url'] = 'https://accounts.google.com/o/oauth2/auth';
// $tlCfg->OAuthServers[1]['token_url'] = 'https://accounts.google.com/o/oauth2/token';
// false => then the only user will be selected automatically (applied for google)
// $tlCfg->OAuthServers[1]['oauth_force_single'] = false;
// the domain you want to whitelist
// $tlCfg->OAuthServers[1]['oauth_domain'] = 'google.com';
// $tlCfg->OAuthServers[1]['oauth_profile'] = 'https://www.googleapis.com/oauth2/v1/userinfo';
// $tlCfg->OAuthServers[1]['oauth_scope'] = 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile';
// $tlCfg->OAuthServers[2]['oauth_enabled'] = true;
// $tlCfg->OAuthServers[2]['oauth_name'] = 'github';
// $tlCfg->OAuthServers[2]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[2]['oauth_client_secret'] = 'CLIENT_SECRET';
// Can be authorization_code (by default), client_credentials or password
// $tlCfg->OAuthServers[2]['oauth_grant_type'] = 'authorization_code';
// $tlCfg->OAuthServers[2]['oauth_url'] = 'https://github.com/login/oauth/authorize';
// $tlCfg->OAuthServers[2]['token_url'] = 'https://github.com/login/oauth/access_token';
// false => then the only user will be selected automatically (applied for google)
// $tlCfg->OAuthServers[2]['oauth_force_single'] = false;
// $tlCfg->OAuthServers[2]['oauth_profile'] = 'https://api.github.com/user';
// $tlCfg->OAuthServers[2]['oauth_scope'] = 'user:email';