Configuring your application
Introduction
The Fuel framework is build with config 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.
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. |
environment | string |
|
Your environment. Read more about environment constants. |
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. |
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. |
encoding | string |
|
The applications default character encoding. |
server_gmt_offset | int |
|
The offset in seconds the server offset from gmt timestamp when time() is used. |
default_timezone | string |
|
The server timezone. |
log_threshold | int |
|
The logging threshold. From what level of error to log. 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 crsf 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 that 0 is the number of sections 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.auto_encode_view_data | 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). |