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:
A url to specify a web accessible url to the CMSMS admin console

Type:
String

Default Value:
$config['root_url'].'/'.$config['admin_dir']
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)
  • 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_path'].'/tmp'

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
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
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:
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;
ssl_css_url
Description:
The secure web location where css files generated by cms_stylesheet can be found. This value is used when generating web requests from secure pages.

Type:
String

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

Accepted:
A secure web accessable URL where generated stylesheet files can be found.
ssl_image_uploads_url
Description:
Specify the secure version of the web accessible URL where images will be available. This must correspond to the image_uploads_path.

Type:
String

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

Accepted:
A web accessible URL
ssl_uploads_url
Description:
Specify the secure version of the URL corresponding to your uploads_url above. This is only necessary when using SSL for some or all pages.

Type:
String

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

Accepted:
A valid, web accessible URL. Ensure that it corresponds to the uploads_path variable.
ssl_url
Description:
Specify the secure URL to the top of your website

Type:
String

Default Value:
The root URL with http:// replaced with https://

Accepted:
A valid, fully qualified HTTPS url to the home page of the website
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:
Integer

Default Value:
TRUE

Example:
$config['startup_mact_processing'] = 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. Additionally, the ssl_uploads_url and ssl_image_uploads_url values may need to be adjusted if using HTTPS.
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:
none

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

Accepted:
none, internal, mod_rewrite

See Also: