Configuration File (config.php) Parameters

Introduction

The configuration file for your installation is inc/config.php. This file is created either manually or via the installation wizard.

This document covers the different values you can configure in this file, as well as some tips that may prove useful.

Parameters

The parameters of the configuration file are constants. They are defined as follows:

define('PARAMETER_NAME','value');

Database settings

DC_DBDRIVER

Type of the database used by Dotclear. You can specify the following values:

  • mysql: MySQL
  • pgsql: PostgreSQL
  • sqlite: SQLite

DC_DBHOST

Hostname of the database. Please note you can specify a port by adding a suffix to the hostname, which consists of a colon and the port number, i.e., ":port-num".

DC_DBUSER

Username for the database.

DC_DBPASSWORD

Password for the database.

DC_DBNAME

Name of the database. In the case of SQLite, it's the only parameter required and contains the path to the database file.

DC_DBPREFIX

Prefix for Dotclear tables in the database. For example, if you specify "dc_", the names of the tables will all start with "dc_".

DC_DBPERSIST

This parameter can be set to true or false and specifies whether connections to the database should be persistent or not.

General settings

DC_MASTER_KEY

This parameter is a string containing the private key used for encrypting passwords stored in the database. Do not change this parameter once Dotclear is installed, otherwise you won't be able to login any more.

DC_ADMIN_URL

Full address of the administration interface. Some plugins require this parameter to be specified. The address should end with a "/", e.g.:

define('DC_ADMIN_URL','http://mysite/dotclear/admin/');

DC_ADMIN_MAILFROM

Email address to use as sender of password recovery mails.

DC_SESSION_NAME

Name of the session cookie. This parameter is set to "dcxd" by default, but you can change it to any value of your choice.

DC_PLUGINS_ROOT

This parameter specifies the path to the plugins. Its default value is "dirname(FILE).'/../plugins", which points to the "plugins" directory of your installation. You can change it or, even better, add additional directories, for example:

define('DC_PLUGINS_ROOT',dirname(__FILE__).'/../plugins:'.dirname(__FILE__).'/../my-plugins');

This parameters tells Dotclear to look for plugins in the "plugins" directory, then in the "my-plugins" directory of your installation. Note that in case of conflict, plugins in directories listed later override those in previously defined directories, which may be useful if you want to modify the behavior of a default plugin without deleting it.

Note:

Remember to use the correct path separator. ":" for Linux/UNIX/Mac, ";" for Windows.

DC_TPL_CACHE

This parameter specifies the path to Dotclear's cache directory, which you may need to create and permission manually (the web server must be able to write here).

Advanced settings

DC_ADMIN_SSL

This parameter can be set to true or false and specifies whether the administration interface is located on a SSL secured host. The primary purpose of this setting is to set the "secure" flag on session cookies, so they will only be available on SSL (HTTPS) connections.

DC_FORCE_SCHEME_443

If this parameter is set to true, the scheme returned by some Dotclear methods to define its URL will always be "https". This should only be used if you encounter redirection issues within the administration interface, and if the administration interface is installed on a SSL host.

DC_XMLRPC_URL

This setting specifies the address pattern of the XML-RPC interface. It uses "%1$sxmlrpc/%2$s" as a default value, where %1$s is the blog URL and %2$s is the blog identifier.

Dotclear provides an additional XML-RPC access point in the administration directory. This allows you to set up XML-RPC access through a secured channel, if the blog administration is on an SSL host.

Therefore, you can set the following value:

define('DC_XMLRPC_URL',DC_ADMIN_URL.'xmlrpc.php?b=%2$1s');

or (if your system/hosting provider supports PATH_INFO) :

define('DC_XMLRPC_URL',DC_ADMIN_URL.'xmlrpc/%2$1s');

DC_UPDATE_VERSION

This parameter is set to "stable" by default. You may specify "testing" if you wish to try pre-release versions of Dotclear.

HTTP_PROXY_HOST & HTTP_PROXY_PORT

If you want to prevent direct outbound traffic from your server, these two settings specify the host and the port of the HTTP proxy that will be used by Dotclear to access the web.

Plugin-specific parameters

DC_ANTISPAM_CONF_SUPER

When set to true, this parameter restricts access to some antispam configuration settings to super-administrators only (especially the time during which spam is stored before automatic deletion).

DC_AKISMET_SUPER

When set to true, this parameter restricts access to Akismet filter configuration to super-administrators.

DC_DNSBL_SUPER

When set to true, this parameter restricts access to DNSBL filter configuration to super-administrators.

DC_FAIRTRACKBACKS_FORCE

When set to true, this parameter forces use of the FairTrackbacks filter, regardless of the choice of the user.

Adding information to the file

The configuration is one of the first files called. You can add extra items you may need, along with simple constants.

mail() function

It is possible to override the function used to send mail. This function uses the standard PHP operation (mail() function) by default. If you encounter issues when sending mail – for example if mail is too frequently stopped by antispam filters, we recommend you configure the mail sending function. For more information, see: Customizing mail sending.

Wiki powered by Dokuwiki.