From KitwarePublic
Revision as of 14:05, 30 August 2017 by Zack (talk | contribs) (Created page with "The system configuration is stored in <tt>.../CDash/config/config.php</tt>, however it's recommended to create a '''config.local.php''' in the same directory that contains '''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The system configuration is stored in .../CDash/config/config.php, however it's recommended to create a config.local.php in the same directory that contains only the variables you wish to change. Doing so will prevent any changes you make from being overwritten when CDash is upgraded and config.php is re-created.

Please note that CDash will read the config.php file first, and then config.local.php. Any variables that are changed in config.local.php will take precedence.

WARNING: If creating the config.local.php from config.php make sure you DELETE any text after the 'DO NOT EDIT AFTER THIS LINE' otherwise your configuration file will be referencing each other. Ideally config.local.php should contain ONLY the variables you have modified.

SQL Database

If you are running the MySQL database on the same server as the Apache web server the defaults should work with no changes:

// Hostname of the MySQL database 
$CDASH_DB_HOST = 'localhost';

// Login for MySQL database access
$CDASH_DB_LOGIN = 'root';

// Password for MySQL database access

// Name of the MySQL database
$CDASH_DB_NAME = 'cdash';

If your MySQL (>= v5) server is set to strict mode, CDash will not work! The reason is that in strict mode, integer columns will not accept the empty string "" as 0 (zero). "" is what the CDash forms currently return for unchecked checkboxes. You'll have to remove the setting STRICT_TRANS_TABLES from the global sql mode parameter. You can query the current setting like this: SELECT @@global.sql_mode;

For more information and more specific settings see the MySQL sql mode documentation.

If you have just installed MySQL don't forget to start it:

rcmysql start

PostgreSQL Database

If you are running the PostgreSQL database read the previous MySQL section about configuring the database access. You will also need to tell CDash to use PostgreSQL driver:

 // Database type (empty means mysql)
 $CDASH_DB_TYPE = 'pgsql';

Here is list of packages necessary on ubuntu

 sudo apt-get install php-pear
 sudo pecl install pdo 
 sudo apt-get install php5-dev
 sudo pecl install pdo
 sudo pecl install pdo_pgsql


You should probably edit the default email addresses:

// Default from email


As of CDash 1.4, authentication to an LDAP database can be performed. This requires the ldap module for php. The variables to define:

 $CDASH_USE_LDAP='1'; // turn this to 1 for LDAP authentication
 $CDASH_LDAP_HOSTNAME='localhost'; // hostname of the LDAP server
 $CDASH_LDAP_BASEDN='ou=people,dc=organization,dc=com'; // Base DN
 $CDASH_LDAP_PROTOCOL_VERSION='3'; // LDAP protocol version

Note that the administrator (first user to install CDash) is always stored in the database.

Backup directory

The backup/log directory by default is placed in .../CDash/backup, this must be made writable by the account that you run Apache under (typically wwwrun or www-data), you can move the directory via:

// Backup directory

Removing registration

The registration can be disabled globally from CDash.

// Doesn't provide registration links

Cookie expiration time

As of CDash 1.2 the login cookie time can be set in the config.php. The default is set to 1 hour.

// Duration of the cookie session (in seconds)

This allows the browser to remember the login/password of the user. On a public computer it is recommended to always log out

Google Maps

As of February of 2014, these links no longer work and I couldn't figure out where to point them. A workaround is just to insert the empty string instead of a key.

CDash can use Google maps to display the location of submission sites. CDash comes with Kitware's key code which won't work for your site's URL. Every site that uses Google maps requires its own Google maps key which you should obtain from Google (it's free), use this style URL when applying for a key:

Paste your newly obtained key in place of Kitware's:

$CDASH_GOOGLE_MAP_API_KEY['localhost'] = 'paste key here';

You may also add multiple keys (wighout the http://) and they will get matched by $_SERVER['HTTP_HOST']

$CDASH_GOOGLE_MAP_API_KEY[''] = 'paste key here';
$CDASH_GOOGLE_MAP_API_KEY[''] = 'paste another key here';

If your submission machines use private IP addresses you can add default location information, e.g. for all machines in the 192.x.x.x network (use to obtain your location):

$CDASH_DEFAULT_IP_LOCATIONS[] = array("IP" => "192.*","latitude" => "42.6612","longitude" => "-73.7689");

Sometimes site location are misreported (e.g. the ISP's location is used), you can override these:

$CDASH_DEFAULT_IP_LOCATIONS[] = array("IP" => "76.65.240.*","latitude" => "43.667","longitude" => "-79.417");

You'll probably want to replace the defaults that are present.

Note: If you use the 192.x.x.x address range ensure you update the location information before submitting from any machines in this subnet, as the location is stored in the database on first submission from a site (but can be subsequently edited from the admin web pages).

Google Analytics

CDash can use Google analytics to monitor site usage. CDash's main index.php contains a reference to a default Kitware Google analytics code:


When you configure each project you will have the opportunity to set a per-project Google analytics code. See Adding GoogleAnalytics for more information.

RSS directory

Ensure that the .../CDash/rss (and .../CDash/backup) directory is writable by the user account that Apache runs under (typically wwwrun).

Production Mode

In order to disable the installation script, especially when the database is not accessible. You should turn on the option:


in your config.local.php