Joomla's configuration.php values

Joomla's configuration file isn't documented well. When you can use the admin panel, it's not an issue, but try changing them when your site is down.

This article is focused on options which are not well documented elsewhere, for a general overview on configuration.php, see this article.

Error reporting

Need help solving Joomla or server errors? We can help

Since Joomla 2.5 (the last version checked is 3.2), the error_reporting variable can have the following values:

  • 'default' or -1: uses defaults from php.ini for error reporting level and display_errors
  • 'none' or 0: disables error reporting entirely (in error log and in web browser)
  • 'simple': enables display_errors, displays only E_ERROR, E_WARNING and E_PARSE
  • 'maximum': enables display_errors, displays messages from E_ALL category
  • 'development': enables display_errors, displays all error messages (-1, since php 5.4 this is the same as 'maximum')
  • Numeric value: enables display_errors, value is passed raw to error_reporting() so it expects the same format

Usually, 'default' is the most reasonable choice. 'none' is a bad idea because it disables logging the errors.

Session handler

The session handler variable controls where sessions are stored - that is, where data about logged in users are kept. Every value but 'none' and 'database' requires a PHP extension installed.

  • 'none': Let PHP handle saving sessions according to its save_handler and save_path variables. Most often it stores sessions as files in save_path.
  • 'database': Uses the database to store sessions. Requires no extra PHP extensions.
  • 'apc': Uses the Alternative PHP Cache to store sessions in RAM.
  • 'memcached': Uses the Memcached server to store sessions in RAM. Requires the memcached PHP extension. The server is configured like this:
    public $memcache_persist = '0';
    public $memcache_compress = '0';
    public $memcache_server_host = '';
    public $memcache_server_port = '11211';
  • 'memcache': Uses the Memcached server to store sessions in RAM. Requires the memcache PHP extension. Using this extension is not recommended, 'memcached' is better. The memcached server configuration for Joomla 2.5+ is identical to the 'memcached' option above. For Joomla 1.5, the configuration looks as following:
    var $memcache_settings = array('compression' => 0, 'persistent' => 0, 'servers' => array(array('host' => '', 'port' => 11211)));
  • 'wincache': This is only available on Windows servers (it's an oxymoron if you ask me).
  • 'xcache': This uses the excellent XCache PHP extension to store sessions in RAM

'xcache' is the best choice here, although it may be tricky to set up properly. 'memcache' is a second close. Or just use the defaults if you don't have performance problems.