Table of Contents
StatusDraft
TodoHow config entries merge, Proof read

Configuration

Information on retrieving and setting configuration items can be found on the config page.

Structure of config files

Configuration files contain an array named $config. Keys of this array are the actual configuration items e.g.

Example

$config['site_domain'] = 'localhost/';

File structure of config files

The file structure of config files follows Kohana's file structure.

application > modules > system

Meaning that configuration files in the application directory take precedence over those in modules take precedence over those in the system directory. The one exception is config.php which is hardcoded into the application/config directory and cannot be moved elsewhere.

config.php

Config.php is hardcoded into Kohana, meaning it has to be in the application/config directory.

/*
 * Options:
 *  site_domain          - domain and installation directory
 *  site_protocol        - protocol used to access the site, usually HTTP
 *  index_page           - name of the front controller, can be removed with URL rewriting
 *  url_suffix           - an extension that will be added to all generated URLs
 *  allow_config_set     - enable or disable setting of Config items
 *  global_xss_filtering - enable or disable XSS attack filtering on all user input
 *  render_stats         - render the statistics information in the final page output
 *  extension_prefix     - filename prefix for library extensions
 *  modules              - extra Kohana resource paths, see <Kohana.find_file>
 *  autoload             - libraries and models to be loaded with the controller
 */

Configuration files

cache.php

Sets the cache driver, cache lifetime and garbage collection. See for more information the Cache library.

cookie.php

Sets defaults for cookies. See for more information the Cookie helper.

database.php

Sets database connection settings. Multiple configurations are possbile. See the database configuration page.

hooks.php

Enable or disable hooks. See Hooks page.

locale.php

Sets the locale and timezone of an application. See Internationalization page.

log.php

Sets the logging threshold. See the Log page.

mimes.php

Sets the available mime-types. (See the validation/upload page?)

pagination.php

Sets pagination settings. See the Pagination page.

payment.php

Sets payment settings.

profiler.php

Sets the information the profiler should show. See the Profiler page.

routes.php

Sets the routes Kohana should use. Includes _default and _allowed. See Routing

session.php

Sets session settings including the session driver. See Session.

upload.php

Sets upload directory.

user_agents.php

Sets available user agents including robots and mobile browsers. See User Agent

view.php

Allowed file types (deprecated?)

general/configuration.txt · Last modified: 2008/05/01 20:31 (external edit)