Elgg  Version 2.3
Namespaces | Variables
settings.example.php File Reference

Go to the source code of this file.


 Activate a plugin or plugins.


global $CONFIG
if(!isset($CONFIG)) $CONFIG dbuser = '{{dbuser}}'
 The database username. More...
$CONFIG dbpass = '{{dbpassword}}'
 The database password. More...
$CONFIG dbname = '{{dbname}}'
 The database name. More...
$CONFIG dbhost = '{{dbhost}}'
 The database host. More...
$CONFIG dbprefix = '{{dbprefix}}'
 The database prefix. More...
$CONFIG broken_mta = false
 Multiple database connections. More...
$CONFIG db_disable_query_cache = false
 Disable the database query cache. More...
$CONFIG auto_disable_plugins = true
 Automatically disable plugins that are unable to boot. More...
$CONFIG min_password_length = 6
 Minimum password length. More...
$CONFIG exception_include = ''
 This is an optional script used to override Elgg's default handling of uncaught exceptions. More...

Variable Documentation

global $CONFIG

Definition at line 19 of file settings.example.php.

$CONFIG auto_disable_plugins = true

Automatically disable plugins that are unable to boot.

Elgg will disable unbootable plugins. If you set this to false plugins will no longer be disabled if they are not bootable. This could cause requests to your site to fail as required views, classes or cached data could be missing.

Setting this to false could be useful during deployment of new code.

bool $CONFIG->auto_disable_plugins

Definition at line 243 of file settings.example.php.

$CONFIG broken_mta = false

Multiple database connections.

Elgg supports master/slave MySQL configurations. The master should be set as the 'write' connection and the slave(s) as the 'read' connection(s).

To use, uncomment the below configuration and update for your site. Memcache setup (optional) This is where you may optionally set up memcache.

Requirements: 1) One or more memcache servers (http://www.danga.com/memcached/) 2) PHP memcache wrapper (http://php.net/manual/en/memcache.setup.php)

You can set a namespace prefix if you run multiple Elgg instances on the same Memcache server.

Note: Multiple server support is only available on server 1.2.1 or higher with PECL library > 2.0.0 Better caching performance

Configuring the location of your data directory and enabling simplecache in the settings.php file improves caching performance. It allows Elgg to skip connecting to the database when serving cached JavaScript and CSS files. If you uncomment and configure these settings, you will not be able to change them from the Elgg advanced settings page. Enable the boot cache

Elgg can store most non-user-specific boot up data in a cache. If you want to enable this, uncomment the next line to set it to 10. Although Elgg has a built- in invalidation strategy for this cache, you should consider a small TTL to minimize the damage if the cache should grow stale. Set cache directory

By default, Elgg uses the data directory to store cache files, but this may be undesirable for sites with the data directory on a distributed file system (e.g. multiple servers with load balancing). You can specify a separate location for the cache files here. Enable SendFile file serving

After enabling X-Sendfile/X-Accel on your server, you can enable its support in Elgg. Set the X-Sendfile-Type value to "X-Sendfile" (Apache) or "X-Accel-Redirect" (Nginx).

string $CONFIG->{'X-Sendfile-Type'} Configure X-Accel on nginx (see SendFile above)

For Nginx, you'll likely also need to set this to a mapping like: "/path/to/dataroot/=/download/".

string $CONFIG->{'X-Accel-Mapping'} Cookie configuration

Elgg uses 2 cookies: a PHP session cookie and an extended login cookie (also called the remember me cookie). See the PHP manual for documentation on each of these parameters. Possible options:

  • Set the session name to share the session across applications.
  • Set the path because Elgg is not installed in the root of the web directory.
  • Set the secure option to true if you only serve the site over HTTPS.
  • Set the expire option on the remember me cookie to change its lifetime

To use, uncomment the appropriate sections below and update for your site.

array $CONFIG->cookies Use non-standard headers for broken MTAs.

The default header EOL for headers is
. This causes problems on some broken MTAs. Setting this to true will cause Elgg to use
, which will fix some problems sending email on broken MTAs.

bool $CONFIG->broken_mta

Definition at line 219 of file settings.example.php.

$CONFIG db_disable_query_cache = false

Disable the database query cache.

Elgg stores each query and its results in a query cache. On large sites or long-running scripts, this cache can grow to be large. To disable query caching, set this to true.

bool $CONFIG->db_disable_query_cache

Definition at line 230 of file settings.example.php.

$CONFIG dbhost = '{{dbhost}}'

The database host.

For most installations, this is 'localhost'

string $CONFIG->dbhost

Definition at line 62 of file settings.example.php.

$CONFIG dbname = '{{dbname}}'

The database name.

string $CONFIG->dbname

Definition at line 53 of file settings.example.php.

$CONFIG dbpass = '{{dbpassword}}'

The database password.

string $CONFIG->dbpass

Definition at line 46 of file settings.example.php.

$CONFIG dbprefix = '{{dbprefix}}'

The database prefix.

This prefix will be appended to all Elgg tables. If you're sharing a database with other applications, use a database prefix to namespace tables in order to avoid table name collisions.

string $CONFIG->dbprefix

Definition at line 73 of file settings.example.php.

if (!isset($CONFIG)) $CONFIG dbuser = '{{dbuser}}'

The database username.

string $CONFIG->dbuser

Definition at line 39 of file settings.example.php.

$CONFIG exception_include = ''

This is an optional script used to override Elgg's default handling of uncaught exceptions.

This should be an absolute file path to a php script that will be called any time an uncaught exception is thrown.

The script will have access to the following variables as part of the scope global $CONFIG $exception - the unhandled exception

- the database may not be available

string $CONFIG->exception_include

Definition at line 269 of file settings.example.php.

$CONFIG min_password_length = 6

Minimum password length.

This value is used when validating a user's password during registration.

int $CONFIG->min_password_length

Definition at line 252 of file settings.example.php.