Configuring your application
Introduction
The Fuel framework is built with configuration over convention in mind. This results in a highly customizable base on which you can start building your application.
Configuration files are stored inside the app/config folder. The application's basic configuration is done in app/config/config.php. The loaded configuration can be made environment specific, more on this under Environments.
Configuration options
| Key | Type | Default | Description |
|---|---|---|---|
| base_url | string | |
The base URL of the application. Can be relative. MUST contain a trailing slash. ('/foo/', 'http://example.com/') |
| url_suffix | string | |
Any suffix that needs to be added to URL's generated by Fuel. If the suffix is an extension, make sure to include the dot. ('.html') |
| index_file | string | |
The name of the main bootstrap file. Set this to false or remove if you using mod_rewrite. |
| controller_prefix | string | |
The class prefix used to find controllers when mapping the URI to the controller class name. You have to change this if you want your controllers namespaced or in a different folder then app/classes/controller. |
| profiling | bool | |
Whether to enable the profiler. |
| caching | bool | |
Whether to enable caching. |
| cache_dir | string | |
The directory to store cache files in. This directory must be writable. |
| cache_lifetime | int | |
The cache lifetime in seconds. |
| ob_callback | callback | |
Callback given to ob_start(), set to ob_gzhandler to enable gzip encoding of output. |
| errors.continue_on | array | |
On which php errors to proceed execution. See Error handling. |
| errors.throttle | int | |
How many errors to show before we stop showing them. (prevents out-of-memory errors) |
| errors.notices | bool | |
Whether to show notices. |
| language | string | |
The default application language, used by the Lang class. |
| locale | string | |
Used for setlocale() required on some php installations, set to false
to prevent it from being set. The syntax setting for this can differ per OS, Ubuntu for example requires a .utf8 (the encoding) suffix. |
| encoding | string | |
The application's default character encoding. |
| server_gmt_offset | int | |
The offset in seconds the server offset from gmt timestamp when time() is used. This is only to correct bad server configuration: time() should always return the number of seconds since January 1 1970 00:00:00 GMT. |
| default_timezone | string | |
The server timezone. |
| log_threshold | int | |
The logging threshold. From what level of message to log, or an array of specific message levels that should be logged. Read about the possible values |
| log_path | string | |
The directory to store the logs in. This directory MUST be writable. |
| log_date_format | string | |
The date/time format used in the logs. |
| security.csrf_autoload | bool | |
Whether to auto-check the csrf token. Read more about csrf. |
| security.csrf_token_key | string | |
Which $_POST key to fetch when checking the csrf token. |
| security.csrf_expiration | int | |
Set the expiration time for the csrf cookie. Anything higher than 0 is the number of seconds in which the cookie will expire. |
| security.uri_filter | array | |
What php functions to use to filter the URI. |
| security.input_filter | array | |
What php functions filter the input arrays ($_GET, $_POST and $_COOKIE). Can be set to xxs_clean, this may cause a performance hit based on the size of the input. |
| security.output_filter | array | |
What php functions filter the variables set to a view. Can be set to xxs_clean, this may cause a performance hit based on the size of the variables. |
| security.auto_filter_output | bool | |
Whether to automatically encode (htmlentities) view data. |
| security.whitelisted_classes | array() | |
With output encoding switched on all objects passed will be converted to strings or throw exceptions unless they are instances of the classes in this array. |
| cookie.expiration | int | |
Number of seconds before the cookie expires. |
| cookie.path | string | |
Restrict the path that the cookie is available to. |
| cookie.domain | string | |
Restrict the domain that the cookie is available to. |
| cookie.secure | bool | |
Only transmit cookies over secure connections. |
| cookie.http_only | bool | |
Only transmit cookies over HTTP, disabling Javascript access. |
| module_paths | array | |
Paths to module directories. Used when adding a module without specifying the location. |
| always_load.packages | array | |
Which packages to autoload. Specify like so: array('package') or array('package' => PKGPATH.'path/to/package') |
| always_load.modules | array | |
Which modules to autoload. Specify like so: array('package'). Autoloaded modules are accessible via the URL. In order for this to work a module path must be set in module_paths |
| always_load.classes | array | |
Which classes to autoload and initiate. |
| always_load.config | array | |
Which config files to autoload. Load a config file into a group like so: array('config') or array('filename' => 'group'). If you do not want to load the file into a set the group name to null: array('filename' => null). |
| always_load.language | array | |
Which language files to autoload. Load a config file into a group like so: array('lang') or array('filename' => 'group'). If you do not want to load the file into a set the group name to null: array('filename' => null). |