config.php Reference

Available Options

Option Details

admin_dir
Description:
Specify the name of the admin directory. This option can be used by advanced users to specify an alternate admin directory name. Although this may cause difficulty with the upgrade process.

Type:
String

Default Value:
admin

Accepted:
A valid directory name (relative to the root_path).
admin_url
Description:
Specify the root url to the admin directory. This can be used if admin access can be accessed by a separate URL.

Type:
String

Accepted:
A valid complete URL to the admin directory.
assets_path
Description:
This variable allows specifying an absolute location where auxillary smarty templates, plugins, and config files can be located for frontend requests.
The system relies on these subdirectories of the assets path:
  • plugins (An additional path to find smarty plugins)
    • simple_plugins (php files with the .cmsplugin extension as a simple way to define smartyplugins.)
    • templates (An additional path to find smarty templates. DesignManager will save exported temlates here. The cmsfile: and file: smarty resources look here.)
    • configs (A path to find smarty config files. Modules may place other config data here.)
    • css (A path to find css files. The DesignManager will place exported styleshets here.)
    • module_custom (A path for overriding module templates, and language files)
    • themes (A path for your CMSMS themes. The cms_theme: resource will look here.)
  • admin_custom (A path for overriding admin lang strings)

Type:
string

Default Value:
$config['root_path'].'/assets'

Example:
$config['assets_path'] = '/var/www/cmsms/assets';

Since:
2.0
assets_url
Description:
This variable allows specifying a web accessible url where auxillary smarty templates, plugins, and config files can be located for frontend requests.
This URL must be web accessible, and must coincide with the assets_path config variable.
  • plugins (An additional path to find smarty plugins)
  • templates (An additional path to find smarty templates)
  • configs (A path to find smarty config files)
  • css (A path to find css files)
  • module_custom (A path for overriding module templates, and language files)
  • admin_custom (A path for overriding admin lang strings)

Type:
string

Default Value:
$config['root_url'].'/assets'

Example:
$config['assets_url'] = 'http://www.mysite.com/assets';

Since:
2.2
auto_alias_content
Description:
Specify whether page aliases should automatically be created for new pages.

Type:
Boolean

Default Value:
FALSE

Accepted:
true or false
cmsjobmgr_asyncfreq
Description:
This config variable specifies the frequency in which attempts should be made to asynchronously process jobs.

Type:
Integer

Default Value:
3

Example:
$config['cmsjobmgr_asyncfreq'] = 3;

Since:
2.2

Notes:
Minimum Value: 3 (a value of 0 does not disable asynchronous job processing)
Maximum Value: 60
css_path
Description:
The path in which cms_stylesheet should generate css files.

Type:
String

Default Value:
$config['public_cache_location'].'/';

Accepted:
A fully qualified filesystem path where generated stylesheet files should be stored.
css_url
Description:
The web location where css files generated by cms_stylesheet can be found.

Type:
String

Default Value:
$config['public_cache_url'];

Accepted:
A web accessable URL where generated stylesheet files can be found.
db_hostname
Description:
Specifies the hostname or IPV4 address of the system that hosts the database.. This should be provided by your host. 'localhost' is the proper value on most hosts.

Type:
String
db_name
Description:
Specifies the name of the database that CMSMS should use

Type:
String

Notes:
The name of a valid, existing database is required. If you are unsure of this value, contact your hosting provider.
db_password
Description:
Specify the password associated to the database user. This is used to allow CMSMS to connect to the database.

Type:
String

Notes:
The password (plain text) that is associated with the database username specified above.
db_port
Description:
Specify an alternate port number to use when connecting to the database. This is useful when your database is available on a port that is not the standard. The information provided from your host should indicate this.

Type:
integer

Default Value:
3306
db_prefix
Description:
Specify a prefix to use infront of all table names. This variable can be used to allow multiple applications to coexist inside the dame database.

Type:
String

Default Value:
cms_
db_username
Description:
The username of the database user that has sufficient privilege to the database name specified above. This is used to allow CMSMS to connect to the database.

Type:
String

Notes:
This is usually the username of your account or the database username created in the admin console. Contact your host for the proper value for this field if you are uncertain.
dbms
Description:
Specifies the database management system and libraries that CMSMS should use.

Type:
string

Accepted:
mysqli

Notes:
Postgres support was removed in CMSMS 1.11. mysql is no longer supported by recent versions of php.
debug
Description:
Indicates whether debug mode is enabled. When debug mode is enabled automatic redirection is disabled and query and trace information is appended to the output. This mode should also be enabled to assist in diagnosing errors when error messages are hidden by default.

Type:
Boolean

Default Value:
FALSE

Accepted:
true or false
debug_to_log
Description:
A flag indicating whether the debug_to_log method should actually output anything. This variable should be set to false for production environments.

Type:
Boolean

Default Value:
FALSE

Notes:
When enabled, the tmp/cache/debug.log file will contain the output from any calls to debug_to_log().
default_encoding
Description:
A character set encoding that can be used in HTML rendering.

Type:
string

Notes:
If not specified, or otherwise set, then the encoding found in the NLS configuration is used. Otherwise, UTF8 is assumed.
developer_mode
Description:
This config variable enables various functionality (Particularly in the ModuleManager) that is intended primarily for module developers.

Type:
Boolean

Default Value:
FALSE

Example:
$config['developer_mode'] = true;
host_whitelist
Description:
Determine if the requested host name is in an allowed list. This is used when calculating the root_url to mitigate potential HTTP_HOST attacks, by verifying that the requested host is permitted.

Type:
Mixed

Example:
$config['root_url'] = 'https://www.mysite.com';

Accepted:
  1. String: A comma separated string of host names, e.g:
    config['host_whitelist'] = 'www.foo.com,fr.foo.com';
  2. Array: An array of host names, e.g:
    $config['host_whitelist'] = array('www.foo.com','fr.foo.com');
  3. A callback function function($str);
    The callback function should accept a single string argument (the current requested host) and return a single string (the matched requested host).

Since:
1.12.2

Notes:
This config entry is only utilized if the root_url is not specified in the config.php.
If the requested host could not be found in the host whitelist, then the system will use the server specified SERVER_NAME when creating the root_url.
image_uploads_path
Description:
The path used by the image manager and other functionality to upload and manages images for your website.

Type:
String

Default Value:
$config['uploads_path'].'/images';

Accepted:
A fully qualified filesystem path where images should be stored
image_uploads_url
Description:
The web accessable URL that corresponds to the image uploads path.

Type:
String

Default Value:
$config['uploads_url'].'/images';

Accepted:
A valid web acceptable URL.

Notes:
Specifying this path may be required if the image_uploads_path has been changed from its default value.
locale
Description:
Locale to use for various default date handling functions, etc. Leaving this blank will use the value associated with the currently selected 'language' for frontend or admin actions. Specifying this value will only be used once per request.

Type:
String

Notes:
This config variable is not normally necessary in a CMSMS installation
Though you can specify any valid locale, the locale information you specify must be installed on the server.

See Also:
log_performance_info
Description:
A flag indicating whether performance information should be appended to a performance log file

Type:
Boolean

Default Value:
FALSE

Notes:
When eneabled, the tmp/cache/performance.log file will contain a line for each request showing performance info.
max_upload_size
Description:
A config entry to specify the maximum size of uploaded files in FileManager/FilePicker.

Type:
Integer

Default Value:
No limit - Use PHP ini settings.

Notes:
Other modules may utilize this config entry, but are not required to.
This setting does not override any PHP ini settings that may effect the maximum file size that can be uploaded.
page_extension
Description:
Used when the url_rewriting is a value other than 'none' this variable specifies the extension that should be appended to all URLS that the system generates.

Type:
String

Example:
$config['page_extension'] = '.html';
permissive_smarty
Description:
This config variable loosens some of the security configuration for smarty templates. Particularly enabling this option allows the use of any php function as a smarty plugin.
We recommend that you DO NOT enable this option if you are allowing content to be submitted for display on your website from untrusted sources.

Type:
Boolean

Example:
$config['permissive_smarty'] = 1;

Since:
2.0
public_cache_location
Description:
This config variable allows specifying a filesystem location where CMSMS can write files that should be publicly browseable

Type:
String

Default Value:
$config['root_path'].'/tmp/cache'

Example:
$config['public_cache_location'] = '/var/www/cmsms/tmp/cache';

Since:
2.0

Notes:
You must specify an absolute directory that is writable by the php process.
public_cache_url
Description:
This config variable allows specifying a web addressable location that can be used to build urls to browseable files.

Type:
String

Default Value:
$config['root_url'].'/tmp/cache'

Example:
$config['public_cache_url'] = '/var/www/cmsms/tmp/cache';

Since:
2.2

Notes:
This config entry must be web accessible and correspond to the directory specified by the public_cache_location config variable.
query_var
Description:
Specifies the name of the URL variable that will indicate the page alias. You should not need to override this value unless the default value interferes with another software package.

Type:
String

Default Value:
page
root_path
Description:
Specify the full and complete filesystem path to this CMSMS installation

Type:
String

Notes:
If not specified, CMSMS will calculate this automatically from the script location.
root_url
Description:
Specify the fully qualified URL to the top of your website.

Type:
String

Example:
$config['root_url'] = 'https://www.mysite.com';

Notes:
Determined Automatically from server variables.
set_db_timezone
Description:
A flag indicating whether a 'set timezone' command should be given to the mysql database upon connection.

Type:
Boolean

Default Value:
FALSE

Accepted:
true or false

See Also:
set_names
Description:
A flag indicating whether a 'set names' command should be given to the mysql database upon connection.

Type:
Boolean

Default Value:
TRUE

Accepted:
true or false
show_performance_info
Description:
A flag indicating whether performance information should be appended to all output from CMSMS requests.

Type:
Boolean

Default Value:
FALSE

Notes:
This setting when enabled could interfere with the output of some modules, for example when downloading files or exporting XML information. This variable is not normally set in the config file, setting this variable to any value will enable the feature.
showbase
Description:
This config variable indicates wether the |base| tag should be output by the {metadata} tag. This config variable can also be overridden by the showbase parameter of the {metadata} tag.

Type:
Boolean

Default Value:
TRUE

Example:
$config['show_base'] = true;
startup_mact_processing
Description:
This config variable indicates whether the output for a module request should be processed before any template rendering is performed.

Type:
string

Default Value:
true

Accepted:
  1. true
  2. false

Since:
2.2
timezone
Description:
The timezone for date calculations. All times entered into and displayed by CMSMS will be in this timezone.

Type:
string

Example:
$config['timezone'] = 'America/Denver';

Notes:
Behaviour has changed regarding timezones between PHP versions, when running PHP 5.2 this variable may not need to be set. However in PHP 5.3 it needs to be set to a valid value for your server.
The behavior of this variable has changed since previous versions of CMSMS. In previous versions of CMSMS the timezone value needed to be set to match the servers timezone. This is not necessarily the case any more.

See Also:
tmp_cache_location
Description:
This config variable allows specifying a secure location where CMSMS can write files that should not necessarily be web browseable.

Type:
String

Default Value:
$config['root_path'].'/tmp/cache'

Example:
$config['tmp_cache_location'] = '/var/www/cmsms/tmp/cache';

Since:
2.0

Notes:
You must specify an absolute directory that is writable by the php process.
tmp_templates_c_location
Description:
This config variable allows specifying a location where smarty can write its compiled templates. This directory does not need to be publicly browseable.

Type:
string

Default Value:
$config['root_path'].'/tmp/templates_c'

Example:
$config['tmp_templates_c_location'] = '/var/www/cmsms/tmp/somedir';

Since:
2.0

Notes:
You must specify an absolute directory that is writable by the php process.
uploads_path
Description:
This variable contains the absolute filesystem path to the location where files should be uploaded.

Type:
String

Default Value:
$config['root_path'].'/uploads';

Accepted:
A valid filesystem path that exists under the CMSMS root directory Please ensure permissions are set correctly to allow the web server to write files to this directory.

Notes:
If you change this path to another directory you may also need to specify the uploads_url, image_uploads_path, and image_uploads_url values.
uploads_url
Description:
The web accessible URL that corresponds to the uploads path

Type:
String

Default Value:
$config['root_url'].'/uploads';

Accepted:
A valid web acceptable URL. Ensure that it corresponds to the uploads_path variable.

Notes:
Specifying this path may be required if the uploads_path has been changed from its default value.
url_rewriting
Description:
What type of URL rewriting should we be using for pretty URLs. The possible values for this variable are system dependant.

Type:
String

Default Value:
internald

Example:
$config['url_rewriting'] = 'mod_rewrite';

Accepted:
none, internal, mod_rewrite

Notes:
The default value for this changed from "none" to "internal" in CMSMS 2.3

See Also: