Child pages
  • $cfg
Skip to end of metadata
Go to start of metadata

This page is still incomplete. Please help us to write a comprehensive CONTENIDO documentation.

Configuration files

CONTENIDO can be configured in great detail using configuration files. These system-wide configuration files could be found in ROOT/data/config/<ENV> where <ENV> is your configured environment.

FileDescription
config.php

Defines general configuration values.

This configuration file is generated by CONTENIDO during setup!

config.misc.phpThis file contains miscellaneous configuration values.
config.path.phpThis file contains configuration values for paths to important directories.
config.templates.phpThis file contains configuration values for template names.
config.local.php

This fil is optional and does not exist after a fresh setup.

Put your modifications into the file 'config.local.php' to prevent that your changes are overwritten during a system update.
cfg_sql.inc.phpThis file contains configuration values for database table names.

Accessing configuration values

Most configuration values are written into a (deeply nested) global configuration variable called $cfg. In order to access these configuration values either the global variable itself (which used to be the standard approach) or the new registry class could be used which is the preferred approach since CONTENIDO 4.9.

// access the whole configuration array
$cfg = cRegistry::getConfig();
// access a single configuration array or value even allowing for a default value
$cfg = cRegistry::getConfigValue($sectionName, $optionName, $defaultValue);

Global configuration

Global configuration values can be defined as key value pairs of the array $cfg.

$cfg[<name>] = <value>;
NameDefaultDescriptionLocationSince
AvailableCharsetsarray('iso-8859-1', 'iso-8859-2', 'iso-8859-3', 'iso-8859-4', 'iso-8859-5', 'iso-8859-6', 'iso-8859-7', 'iso-8859-8', 'iso-8859-8-i', 'iso-8859-9', 'iso-8859-10', 'iso-8859-11', 'iso-8859-12', 'iso-8859-13', 'iso-8859-14', 'iso-8859-15', 'iso-8859-16', 'windows-1250', 'windows-1251', 'windows-1252', 'windows-1253', 'windows-1254', 'windows-1255', 'windows-1256', 'windows-1257', 'windows-1258', 'koi8-r', 'big5', 'gb2312', 'utf-8', 'utf-7', 'x-user-defined', 'euc-jp', 'ks_c_5601-1987', 'tis-620', 'SHIFT_JIS')Array of charsets that will be available when editing a language for a client.config.misc.php 
helpfalseEnable the help system. This feature has to be overhauled.config.misc.php 
database_extension'mysqli'Database extension/driver to use, feasible values are 'mysqli' or 'mysql'.
Should be part of Database configuration!
config.php 
login_languagesDepends upon folders in $cfg['path']['contenido_locale'].Determined in startup.php. Array of locales of backend languages that are found in $cfg['path']['contenido_locale'].not configurable 
native_i18nfalse

Flag to use native i18n. Note: Enabling this could create unwanted side effects, because of native gettext() behavior.

config.misc.php 
php_error_reportingE_ALL & ~(E_STRICT | E_NOTICE)PHP error reporting setting.
Should be part of PHP configuration!
config.misc.php 
simulate_magic_quotesDepends upon your setting of magic_quotes_gpc().Determined in globals_off.inc.php. When magic_quotes_gpc() is disabled magic quotes have to be "simulated" by adding slashes on names, descriptions and code of layouts and templates.not configurable 
statistics_heap_tablefalseUse heap table to accelerate statitics (off by default)config.misc.php 
translatable_content_typesarray('CMS_TEASER', 'CMS_FILELIST')

Define here all content types which includes special module translations (dont forget the prefix 'CMS_'!).
Should be part of Content Type configuration!

config.misc.php 
urlpathresolvefalseIf true, use the field 'urlname' for resolving. 'name' otherwise.config.misc.php 
use_pseudocrontrueUse Pseudo-Cron?config.misc.php 
versionCON_VERSIONCurrent CONTENIDO Version.config.misc.php 

Backend configuration

Backend configuration values can be defined as key value pairs of the array $cfg['backend'].

$cfg['backend'][<name>] = <value>;
NameDefaultDescriptionLocationSince
timeout60Lifetime of backend authentication in minutes. If none is defined the default will be 15 minutes.config.misc.php 

Cache configuration

Cache configuration values can be defined as key value pairs of the array $cfg['cache'].

$cfg['cache'][<name>] = <value>;
NameDefaultDescriptionLocationSince
disabletrue

Enable/disable caching. This flag is for globally activating the caching feature in all frontends.

You can control the caching behaviour of each client by configuring it separately in its specific configuration file located in cms/includes/concache.php. So, if you want to enable frontend caching, set $cfg['cache']['disable'] to false and configure the rest in cms/includes/concache.php!

config.misc.php 

Client template configuration

Client template configuration values can be defined as key value pairs of the array $cfg['client_template'].

$cfg['client_template'][<name>] = <value>;
NameDefaultDescriptionLocationSince
allowed_extensions'html,tpl'

allowed extensions of template files in the client template folder only files with these extensions will be shown in "Style | Module templates"

config.misc.php 
default_extension'html'

default extensions of template files in the client template folder if no extension is defined for new files this default will be assumed

config.misc.php 

Code generator configuration

Code generator configuration values can be defined as key value pairs of the array $cfg['code_generator'].

$cfg['code_generator'][<name>] = <value>;
NameDefaultDescriptionLocationSince
name'Standard'Name of code generator to use (e. g. 'Standard' to use class cCodeGeneratorStandard).config.misc.php 

CONTENIDO configuration

CONTENIDO configuration values can be defined as key value pairs of the array $cfg['contenido'].

$cfg['contenido'][<name>] = <value>;
NameDefaultDescriptionLocationSince
errorpage''

Configure page if CONTENIDO is unable to run (e.g. no database connection). It is wise to create a maintenance HTML page for redirection, so you won't confuse your customers. Note: The URL should be absolute with http:// in front of it.

config.misc.php 
notifyinterval20Configure how often the notification email is sent, in minutesconfig.misc.php 
notifyonerror''Configure an email address to alert when CONTENIDO is unable to runconfig.misc.php 

Content type configuration

Content type configuration values can be defined as key value pairs of the array $cfg['content_types'].

$cfg['content_types'][<name>] = <value>;
NameDefaultDescriptionLocationSince
CMS_LINKEDIT...Content type CMS_LINKEDIT settings.config.misc.php 

Database configuration

Database configuration values can be defined as key value pairs of the array $cfg['db'].

$cfg['db'][<name>] = <value>;

Extended database settings. This settings will be used from CONTENIDO 4.9.0.

NameDefaultDescriptionLocationSince
connectionhost The host where your database runs onconfig.php4.9.0
connectiondatabase The database name which you useconfig.php4.9.0
connectionuser The username to access the databaseconfig.php4.9.0
connectionpassword The password to access the databaseconfig.php4.9.0
connectioncharset'utf8'The charset of connection to databaseconfig.php4.9.0
haltBehavior'report'Feasible values are 'yes', 'no' or 'report'config.php4.9.0
haltMsgPrefix(isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] . ' ' : ''Text to prepend to the halt message in cDbDriverHandler.config.php4.9.0
enableProfilingfalseFlag to enable profilingconfig.php4.9.0

DBFS configuration

DBFS (database file system) values can be defined as key value pairs of the array $cfg['dbfs'].

$cfg['dbfs'][<name>] = <value>;
NameDefaultDescriptionLocationSince
skip_content_disposition_header_for_mimetypesarray('application/x-shockwave-flash')

List of mimetypes where the output of the Content-Disposition header should be skipped.

config.misc.php 

Debug configuration

Debug configuration values can be defined as key value pairs of the array $cfg['debug'].

$cfg['debug'][<name>] = <value>;
NameDefaultDescriptionLocationSince
functiontimingfalseIf you want to measure function timing set this to trueconfig.misc.php 
renderingfalseIf you want to measure backend page rendering times, set this to trueconfig.misc.php 
codeoutputfalseTo output the code when editing and browsing the frontend, set this to trueconfig.misc.php 
disable_chainsfalseWhether the chain system should be disabled.config.misc.php4.9.0 Beta 1
disable_pluginsfalseWhether the plugin system should be disabled. If disabled, plugins are neither scanned nor included.config.misc.php4.9.0 Beta 1
log_deprecationstrueWhether deprecations should be logged. If disabled, there are no information on usage of outdated code.config.misc.php4.9.0 Beta 1
log_stacktracestrueWhether stacktraces should be logged. If disabled, the stacktrace is not logged with the corresponding error in log.config.misc.php 
backend_exectimefullstart Determined in main.php/ ajaxmain.php. Microtime when script is started.
Purpose of this data is profiling the backend and should not be part of configuration.
not configurable 
backend_exectimestart 

Determined in main.php/ ajaxmain.php. Microtime before backend page is included.
Purpose of this data is profiling the backend and should not be part of configuration.

not configurable 
backend_exectimeend Determined in main.php/ ajaxmain.php. Microtime when script is done.
Purpose of this data is profiling the backend and should not be part of configuration.
not configurable 

Default permission configuration

Default permission configuration values can be defined as key value pairs of the array $cfg['default_perms'].

$cfg['default_perms'][<name>] = <value>;
NameDefaultDescriptionLocationSince
directory0775octal value (with a leading zero!) for use in chmodconfig.misc.php 
file0664octal value (with a leading zero!) for use in chmodconfig.misc.php 

Image configuration

Image configuration values can be defined as key value pairs of the array $cfg['images'].

$cfg['images'][<name>] = <value>;

The name column may contain more than one name. Use these as subsequent keys.

NameDefaultDescriptionLocationSince
image_magickusetrue

Flag to use ImageMagick, if available. If disabled, the image functions will try to use PHP GD library.

config.misc.php 
image_magickpath''

Optional, path to ImageMagick binary directory, with ending slash e. g. C:/Program Files/ImageMagick/

use slashes - not backslashes!
You should set this on a windows os, otherwhise the system could execute the "convert.exe" from system32 folder. This executable does not belongs to ImageMagick.
config.misc.php 

Inuse configuration

Inuse configuration values can be defined as key value pairs of the array $cfg['inuse'].

$cfg['inuse'][<name>] = <value>;
NameDefaultDescriptionLocationSince
lifetime3600Livetime in secondsconfig.misc.php 

Language configuration

Language configuration values can be defined as key value pairs of the array $cfg['lang'].

$cfg['lang'][<name>] = <value>;
NameDefaultDescriptionLocationSince
en_USlang_en_US.xml   
de_DElang_de_DE.xml   

Password configuration

Password configuration values can be defined as key value pairs of the array $cfg['password'].

$cfg['password'][<name>] = <value>;
NameDefaultDescriptionLocationSince
check_password_masktrueEnable or disable checking passwordconfig.misc.php 
min_length6Minimum length of password (num characters). Default is 6.config.misc.php 
mixed_case_mandatory0

If set to a value greater than 0 so many lower and upper case character must appear in the password. (e.g.: if set to 2, 2 upper and 2 lower case characters must appear)

config.misc.php 
symbols_mandatory0

If 'symbols_mandatory' set to a value greater than 0, at least so many symbols has to appear in given password.

config.misc.php 
numbers_mandatory2

If set to a value greater than 0, at least $cfg['password']['numbers_mandatory'] numbers must be in password

config.misc.php 

Path configuration

Path configuration values can be defined as key value pairs of the array $cfg['path'].

$cfg['path'][<name>] = <value>;

Path configuration values are URLs and filesystem paths or fragments of it:

  • A URL path is a web addresse. E.g. http://192.168.1.1/test/
  • A filesystem path is the path to a file or folder on the server's hard disk. E.g.: /var/www/html/contenido on *nix or C:\htdocs\contenido on Windows systems. There is no need to use backslashes on windows systems. Slashes are just fine here!
Usually all paths end with a slash. The one exception is $cfg['path']['frontend']!
NameDefaultDescriptionLocationSince
all_wysiwyg$cfg['path']['contenido']  . 'external/wysiwyg/'Absolute filesystem path to available WYSIWYG-Editors.config.php 
all_wysiwyg_html$cfg['path']['contenido_fullhtml'] . 'external/wysiwyg/'URL path to available WYSIWYG-Editors.config.php 
cache'data/cache/'Path fragment of the cache folder relative to the "frontend" folder.config.path.php 
classes'classes/'Path fragment of the classes folder relative to ???.config.path.php 
contenido$cfg['path']['frontend'] . '/contenido/'Absolute filesystem path to the CONTENIDO backend folder.config.php 
contenido_cache$cfg['path']['frontend'] . '/' . $cfg['path']['cache']Absolute filesystem path to the system cache folder.config.path.php 
contenido_config    
contenido_cronlog$cfg['path']['frontend'] . '/' . $cfg['path']['cronlog']Absolute filesystem path to the system cronlog folder.config.path.php 
contenido_fullhtml'http://con49.local/contenido/'The web server path to the CONTENIDO backendconfig.php 
contenido_html'../contenido/' config.path.php 
contenido_locale$cfg['path']['frontend'] . '/' . $cfg['path']['locale']Absolute filesystem path to the system locale folder.config.path.php 
contenido_logs$cfg['path']['frontend'] . '/' . $cfg['path']['logs']Absolute filesystem path to the system logs folder.config.path.php 
contenido_maillog$cfg['path']['frontend'] .'/' . $cfg['path']['maillog']Absolute filesystem path to the system maillog folder.config.path.php 
contenido_temp$cfg['path']['frontend'] . '/' . $cfg['path']['temp']Absolute filesystem path to the system temp folder.config.path.php 
cronjobs'cronjobs/'Path fragment of the cronjobs folder relative to the "contenido" folder.config.path.php 
cronlog'data/cronlog/'Path fragment of the cronlog folder relative to the "frontend" folder.config.path.php 
data$cfg['path']['frontend'] . '/data/'Absolute filesystem path to the system data folder.config.php 
exceptions$cfg['path']['classes'] . 'exceptions/'Path fragment of the exceptions folder.config.path.php 
external'external/'Path fragment of the external folder relative to the "contenido" folder.config.path.php 
frontend'/var/www/<ROOT>'Absolute filesystem path to the folder where all frontends are located.config.php 
frontendtemplate'external/frontend/'Path fragment of the frontendtemplate folder relative to the "contenido" folder. This folder is used as skeleton for new clients.config.path.php 
images'images/' config.path.php 
includes'includes/' config.path.php 
interfaces$cfg['path']['classes'] . 'interfaces/' config.path.php 
layouts'layouts/' config.path.php 
locale'data/locale/'Path fragment of the locale folder relative to the "frontend" folder.config.path.php 
logs'data/logs/'Path fragment of the logs folder relative to the "frontend" folder.config.path.php 
maillog'data/maillog'Path fragment of the maillog folder relative to the "frontend" folder.config.path.php 
modules'modules/' config.path.php 
pear$cfg['path']['frontend'] . '/pear/'Absolute filesystem path to the system PEAR folder.config.php 
plugins'plugins/'Path fragment of the maillog folder relative to the "contenido" folder.config.path.php 
repository$cfg['path']['plugins'] . 'repository/' config.path.php 
scripts'scripts/' config.path.php 
styles'styles/' config.path.php 
temp'data/temp/'Path fragment of the temp folder relative to the "frontend" folder.config.path.php 
templates'templates/standard/'Path fragment of the standard templates folder relative to the "contenido" folder.config.path.php 
wysiwyg$cfg['path']['all_wysiwyg'] . 'tinymce3/'Absolute filesystem path to the active WYSIWYG-Editor.config.php 
wysiwyg_html$cfg['path']['all_wysiwyg_html'] . 'tinymce3/'URL path to the active WYSIWYG-Editor.config.php 
xml'xml/'Path fragment of the XML folder relative to the "contenido" folder.config.path.php 

PHP settings configuration

PHP settings configuration values can be defined as key value pairs of the array $cfg['php_settings'].

$cfg['php_settings'][<name>] = <value>;

Configuration of different PHP settings. It is possible to configure each available PHP setting, which can be set by ini_set() method. All defined settings will be applied in contenido/includes/startup.php

NameDefaultDescriptionLocationSince
display_errorsfalseDisplay PHP errorsconfig.misc.php 
log_errorstrueEnable logging of PHP errorsconfig.misc.php 
error_log$cfg['path']['contenido_logs'] . 'errorlog.txt'Path to log fileconfig.misc.php 
date.timezone''valid PHP timezone http://php.net/manual/en/timezones.phpconfig.misc.php 
default_charset'UTF-8'valid PHP default charsetconfig.misc.php 

Properties configuration

Properties configuration values can be defined as key value pairs of the array $cfg['properties'].

$cfg['properties'][<name>] = <value>;

Here you can configure the behavior of properties (user, group, system and general properties). Enabling caching for a specific properties will preload all related entries which enhances the performance during application lifecycle.

The name column may contain more than one name. Use these as subsequent keys.

NameDefaultDescriptionLocationSince
user_propenable_cachetrueEnable caching of user propertiesconfig.misc.php 
group_propenable_cachetrueEnable caching of group propertiesconfig.misc.php 
group_propmax_groups3

Max groups to cache. Is helpfull if a user is in several groups. It's recommended to have a lower number, e. g. 3

config.misc.php 
system_propenable_cachetrueEnable caching of system propertiesconfig.misc.php 
propertiesenable_cachetrueEnable caching of general properties (for current client)config.misc.php 
propertiesitemtypes...

Configuration of itemtypes and itemids which should be cached. Itemids are represented with wild-cards and will be replaced as follows:

  • %client% against current client id
  • %lang% against current language id
config.misc.php 

SQL configuration

SQL (or GenericDB) configuration values can be defined as key value pairs of the array $cfg['sql'].

$cfg['sql'][<name>] = <value>;

The name column may contain more than one name. Use these as subsequent keys.

NameDefaultDescriptionLocationSince
cachemax_items_to_cache10Number of GenericDB items per table to cacheconfig.misc.php 
cacheenabletrueEnable GenericDB item cacheconfig.misc.php 
gdb_driver'mysql'The GenericDB driver to use, at the moment only 'mysql' is supportedconfig.misc.php 
select_all_modetrueEnable mode to select all fields in GenericDB item collections.config.misc.php 
sqlprefix'con'The prefix for all CONTENIDO system tables, usually 'con'config.php 

System log configuration

System log configuration values can be defined as key value pairs of the array $cfg['system_log'].

$cfg['system_log'][<name>] = <value>;
NameDefaultDescriptionLocationSince
number_of_lines100Number of linesconfig.misc.php 
file_extensionsarray('txt', 'log')Searched file extensionsconfig.misc.php 

Table configuration

Table configuration values can be defined as key value pairs of the array $cfg['tab'].

$cfg['tab'][<name>] = <value>;
NameDefaultDescriptionLocation 
**Name of the database table including the prefix that was defined on setup.cfg_sql.inc.php 

Template configuration

Template configuration values can be defined as key value pairs of the array $cfg['templates'].

$cfg['templates'][<name>] = <value>;

The list of available templates is far to long to be listed here.

NameDefaultDescriptionLocation
* Template files for pages.config.templates.php
widgets  Template files for widgtes.config.templates.php

URL builder configuration

URL builder configuration values can be defined as key value pairs of the array $cfg['url_builder'].

$cfg['url_builder'][<name>] = <value>;

Example setting for UriBuilder 'front_content' (generates URLs like '/cms/front_content.php?idcat=2&lang=1'):

$cfg['url_builder']['name']   = 'front_content';
$cfg['url_builder']['config'] = array();

Example setting for UriBuilder 'custom_path' (generates URLs like '/cms/Was-ist-Contenido/rocknroll,a,2.4fb'):

$cfg['url_builder']['name']   = 'custom_path';
$cfg['url_builder']['config'] = array('prefix' => 'rocknroll', 'suffix' => '.4fb', 'separator' => ',');

See also http://forum.contenido.org/viewtopic.php?f=64&t=23280

NameDefaultDescriptionLocationSince
configarray()

Default UriBuilder configuration. An associative configuration array which will be passed to the UriBuilder instance. Values depend on used UriBuilder.

config.misc.php 
name'front_content'

Name of UriBuilder to use. Feasible values are 'front_content', 'custom', 'custom_path' or a user defined name. Check out cUriBuilderFactory::getUriBuilder() in contenido/classes/uri/class.uriBuilder.factory.php for more details about this setting.

config.misc.php 

Validator configuration

Validator builder configuration values can be defined as key value pairs of the array $cfg['validator'].

$cfg['validator'][<name>] = <value>;

The name column may contain more than one name. Use these as subsequent keys.

NameDefaultDescriptionLocationSince
emaildisallow_tldarray('.test', '.example', '.invalid', '.localhost')

Optional, list of top level domains to disallow. Validation of E-Mail addresses having configured top level domains will fail!

config.misc.php 
emaildisallow_hostarray('example.com', 'example.org', 'example.net')

Optional, list of hosts to disallow. Validation of E-Mail addresses having configured hosts will fail!

config.misc.php 
emailmx_checkfalseOptional, flag to check DNS records for MX type.config.misc.php