Configuration Files
Cadre normally uses two configuration files: one for each domain and one for the whole installation. There are a number of variables that can go in these configuration files, and the important thing to remember is that variables can be moved between either file at any time, since the two will be added together when the site is finally loaded. Note that global settings override local ones, however. (See Installation Structure for more information.)
fieldrecommended valuemeaning
database options
$dbtype"MySQL"The underlying database to use. (MySQL is the only type supported at present.)
$GLOBALS['PERSISTENT_CONNECTION']trueAttempt to reuse old SQL connections.
database connection information
$db_hostnameThe computer name or IP address where the database server resides.
$db_usernameThe username to log into the database with.
$db_passwordThe plaintext password for connecting to the database.
identity
$GLOBALS['ADMIN_EMAIL'](your e-mail)How to contact the administrator in case of site issues
date_default_timezone_set()Timezone for PHP date() function; comment out this line to get the timezone from php.ini instead
debugging and development options
$debugmodefalseWhether or not to display debug messages at all. Recommended for development.
$debugSQLfalseWhether or not to display additional database backend messages in the debug logs. Rarely necessary.
$debugdeeptrueEnable capturing all PHP notices and error messages in Cadre debug messages.
uploading and downloading
$GLOBALS['VROOT']$_SERVER['DOCUMENT_ROOT'] . "/pictures/"Path to a safe space where Cadre expects full permissions for managing user uploads
$GLOBALS['MY_PERMS']511umask for uploaded files (default permissions, in octal, applied to newly-uploaded files)
database and PHP compatibility
$GLOBALS['DATETIMEFORMAT']"Y-m-d H:i:s"Date/time format to use when displaying current time and updating current time values; must be compatible with database.
$GLOBALS['UNICODE_DEFICIENT']0If the database refuses to handle UTF-8 and truncates entries on sight, turn this option on. It will enable encoding of all non-ASCII as HTML entities. Cadre attempts to ensure the connection is correct, but not every old version of MySQL listens. If this option is enabled, edit_display() and info_display() will not protect HTML entities from parsing.
$GLOBALS['PROFOUNDLY_UNICODE_
DEFICIENT']
0Profound Unicode deficiency is used when PHP is preordained to try fixing Unicode deficiency on its own but still leaves you with an 8-bit character set problem. Enable this if foreign scripts can be entered into the DB, but extended characters in your own locale get truncated. Has no effect if UNICODE_DEFICIENT is disabled.
$GLOBALS['PROFOUNDLY_UNICODE_
DEFICIENT_CHARSET']
"Windows-1252"
$GLOBALS['ANCIENT_CHARSET_
HANDLING']
0You should not need this.
special user groups
$GLOBALS['GROUP_CREATE_ORPHAN']1Defines the group that grants the ability to create pages with parent = 0
$GLOBALS['GROUP_CREATE_NEW_PAGE']1Defines the group that can see and use new_page.star
$GLOBALS['GROUP_ROOT']1This group has full access to the Lists administrative interface
$GLOBALS['MAX_ROOT']1The first n users will be regarded as root if the group described by $GLOBALS['GROUP_ROOT'] does not exist
additional behaviour options
$GLOBALS['CREATOR_RIGHTS']1If someone makes a page, do they have guaranteed full permissions on it for the rest of their page load? Necessary to support anonymous page creation (i.e. anonymous commenting)
deployment-specific
$GLOBALS['CADRE']"../cadre"The relative or absolute path from the web root to the Cadre installation; for security, make sure that Cadre itself is not web-accessible. The recommended default, "../cadre" is appropriate when running a whole domain or subdomain with Cadre.
$GLOBALS['FRONT_PAGE']1The page ID number to show the visitor when no page= or id= parameter is passed to index.star.
$db_schemaThe database/schema name to use. (The global configuration file includes code to set this to 'cadre' if it is left blank.)
$GLOBALS['GUARD_INFO_MODE']1Conceal public access to the 'info' mode, which allows viewing arbitrary before-calculation source code for pages on the site. Note: This does not prevent access to the 'archive' mode.
$ban_urlPath to redirect IPs of banned visitors to.
$headfoot_prefix"layouts/my_site/"Path within the root Cadre install (see $GLOBALS['CADRE'], above) where the site's layout files can be found. (This is only for non-externally-retrievable resources, like header and footer; CSS and image assets should still go on in the webroot somewhere.)
$lists_pagesarray()Extra pages to add into the Lists administrative interface. This should be an associative array relating page modes as keys (e.g. "sync") to page titles as values (e.g. "Page Synchronization".) Note: As multiple pages may have the same name, it is strongly encouraged that such extras be created early in the database (or perhaps by rearranging other pages) to ensure they have a low ID number, as page IDs are immutable within the Cadre interface.