darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 1 | <?php |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 5 | * An open source application development framework for PHP |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 6 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 7 | * This content is released under the MIT License (MIT) |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 8 | * |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 9 | * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 10 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 11 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 12 | * of this software and associated documentation files (the "Software"), to deal |
| 13 | * in the Software without restriction, including without limitation the rights |
| 14 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 15 | * copies of the Software, and to permit persons to whom the Software is |
| 16 | * furnished to do so, subject to the following conditions: |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 17 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 18 | * The above copyright notice and this permission notice shall be included in |
| 19 | * all copies or substantial portions of the Software. |
| 20 | * |
| 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 22 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 24 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 25 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 26 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 27 | * THE SOFTWARE. |
| 28 | * |
| 29 | * @package CodeIgniter |
| 30 | * @author EllisLab Dev Team |
darwinel | 871754a | 2014-02-11 17:34:57 +0100 | [diff] [blame] | 31 | * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 32 | * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 33 | * @license http://opensource.org/licenses/MIT MIT License |
| 34 | * @link http://codeigniter.com |
| 35 | * @since Version 1.0.0 |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 36 | * @filesource |
| 37 | */ |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 39 | |
| 40 | /* |
| 41 | |-------------------------------------------------------------------------- |
| 42 | | Base Site URL |
| 43 | |-------------------------------------------------------------------------- |
| 44 | | |
| 45 | | URL to your CodeIgniter root. Typically this will be your base URL, |
| 46 | | WITH a trailing slash: |
| 47 | | |
| 48 | | http://example.com/ |
| 49 | | |
Andrey Andreev | 815ac8a | 2014-10-28 21:32:20 +0200 | [diff] [blame] | 50 | | If this is not set then CodeIgniter will try guess the protocol, domain |
| 51 | | and path to your installation. However, you should always configure this |
| 52 | | explicitly and never rely on auto-guessing, especially in production |
| 53 | | environments. |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 54 | | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 55 | */ |
Andrey Andreev | 815ac8a | 2014-10-28 21:32:20 +0200 | [diff] [blame] | 56 | $config['base_url'] = ''; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 57 | |
| 58 | /* |
| 59 | |-------------------------------------------------------------------------- |
| 60 | | Index File |
| 61 | |-------------------------------------------------------------------------- |
| 62 | | |
| 63 | | Typically this will be your index.php file, unless you've renamed it to |
| 64 | | something else. If you are using mod_rewrite to remove the page set this |
| 65 | | variable so that it is blank. |
| 66 | | |
| 67 | */ |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 68 | $config['index_page'] = 'index.php'; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 69 | |
| 70 | /* |
| 71 | |-------------------------------------------------------------------------- |
| 72 | | URI PROTOCOL |
| 73 | |-------------------------------------------------------------------------- |
| 74 | | |
| 75 | | This item determines which server global should be used to retrieve the |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 76 | | URI string. The default setting of 'AUTO' works for most servers. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 77 | | If your links do not seem to work, try one of the other delicious flavors: |
| 78 | | |
Andrey Andreev | f2b19fe | 2012-10-31 16:16:24 +0200 | [diff] [blame] | 79 | | 'AUTO' Default - auto detects |
| 80 | | 'CLI' or 'argv' Uses $_SERVER['argv'] (for php-cli only) |
Andrey Andreev | f2b19fe | 2012-10-31 16:16:24 +0200 | [diff] [blame] | 81 | | 'PATH_INFO' Uses $_SERVER['PATH_INFO'] |
Andrey Andreev | 3b72eb5 | 2012-11-01 00:45:26 +0200 | [diff] [blame] | 82 | | 'REQUEST_URI' Uses $_SERVER['REQUEST_URI'] |
Andrey Andreev | f2b19fe | 2012-10-31 16:16:24 +0200 | [diff] [blame] | 83 | | 'QUERY_STRING' Uses $_SERVER['QUERY_STRING'] |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 84 | | |
| 85 | */ |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 86 | $config['uri_protocol'] = 'AUTO'; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 87 | |
| 88 | /* |
| 89 | |-------------------------------------------------------------------------- |
| 90 | | URL suffix |
| 91 | |-------------------------------------------------------------------------- |
| 92 | | |
| 93 | | This option allows you to add a suffix to all URLs generated by CodeIgniter. |
| 94 | | For more information please see the user guide: |
| 95 | | |
| 96 | | http://codeigniter.com/user_guide/general/urls.html |
| 97 | */ |
| 98 | |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 99 | $config['url_suffix'] = ''; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 100 | |
| 101 | /* |
| 102 | |-------------------------------------------------------------------------- |
| 103 | | Default Language |
| 104 | |-------------------------------------------------------------------------- |
| 105 | | |
| 106 | | This determines which set of language files should be used. Make sure |
| 107 | | there is an available translation if you intend to use something other |
| 108 | | than english. |
| 109 | | |
| 110 | */ |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 111 | $config['language'] = 'english'; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 112 | |
| 113 | /* |
| 114 | |-------------------------------------------------------------------------- |
| 115 | | Default Character Set |
| 116 | |-------------------------------------------------------------------------- |
| 117 | | |
| 118 | | This determines which character set is used by default in various methods |
| 119 | | that require a character set to be provided. |
| 120 | | |
freewil | 8cc0cfe | 2011-08-27 21:53:00 -0400 | [diff] [blame] | 121 | | See http://php.net/htmlspecialchars for a list of supported charsets. |
| 122 | | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 123 | */ |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 124 | $config['charset'] = 'UTF-8'; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 125 | |
| 126 | /* |
| 127 | |-------------------------------------------------------------------------- |
| 128 | | Enable/Disable System Hooks |
| 129 | |-------------------------------------------------------------------------- |
| 130 | | |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 131 | | If you would like to use the 'hooks' feature you must enable it by |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 132 | | setting this variable to TRUE (boolean). See the user guide for details. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 133 | | |
| 134 | */ |
| 135 | $config['enable_hooks'] = FALSE; |
| 136 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 137 | /* |
| 138 | |-------------------------------------------------------------------------- |
| 139 | | Class Extension Prefix |
| 140 | |-------------------------------------------------------------------------- |
| 141 | | |
| 142 | | This item allows you to set the filename/classname prefix when extending |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 143 | | native libraries. For more information please see the user guide: |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 144 | | |
| 145 | | http://codeigniter.com/user_guide/general/core_classes.html |
| 146 | | http://codeigniter.com/user_guide/general/creating_libraries.html |
| 147 | | |
| 148 | */ |
| 149 | $config['subclass_prefix'] = 'MY_'; |
| 150 | |
Andrey Andreev | ed86ee1 | 2014-07-11 19:48:37 +0300 | [diff] [blame] | 151 | /* |
| 152 | |-------------------------------------------------------------------------- |
| 153 | | Composer auto-loading |
| 154 | |-------------------------------------------------------------------------- |
| 155 | | |
| 156 | | Enabling this setting will tell CodeIgniter to look for a Composer |
| 157 | | package auto-loader script in application/vendor/autoload.php. |
| 158 | | |
| 159 | | $config['composer_autoload'] = TRUE; |
| 160 | | |
| 161 | | Or if you have your vendor/ directory located somewhere else, you |
| 162 | | can opt to set a specific path as well: |
| 163 | | |
| 164 | | $config['composer_autoload'] = '/path/to/vendor/autoload.php'; |
| 165 | | |
| 166 | | For more information about Composer, please visit http://getcomposer.org/ |
| 167 | | |
| 168 | | Note: This will NOT disable or override the CodeIgniter-specific |
| 169 | | autoloading (application/config/autoload.php) |
| 170 | */ |
| 171 | $config['composer_autoload'] = FALSE; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 172 | |
| 173 | /* |
| 174 | |-------------------------------------------------------------------------- |
| 175 | | Allowed URL Characters |
| 176 | |-------------------------------------------------------------------------- |
| 177 | | |
Andrey Andreev | de14aa5 | 2014-01-15 15:51:08 +0200 | [diff] [blame] | 178 | | This lets you specify which characters are permitted within your URLs. |
| 179 | | When someone tries to submit a URL with disallowed characters they will |
| 180 | | get a warning message. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 181 | | |
| 182 | | As a security measure you are STRONGLY encouraged to restrict URLs to |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 183 | | as few characters as possible. By default only these are allowed: a-z 0-9~%.:_- |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 184 | | |
| 185 | | Leave blank to allow all characters -- but only if you are insane. |
| 186 | | |
Andrey Andreev | de14aa5 | 2014-01-15 15:51:08 +0200 | [diff] [blame] | 187 | | The configured value is actually a regular expression character group |
| 188 | | and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i |
| 189 | | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 190 | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! |
| 191 | | |
| 192 | */ |
| 193 | $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; |
| 194 | |
| 195 | |
| 196 | /* |
| 197 | |-------------------------------------------------------------------------- |
| 198 | | Enable Query Strings |
| 199 | |-------------------------------------------------------------------------- |
| 200 | | |
| 201 | | By default CodeIgniter uses search-engine friendly segment based URLs: |
| 202 | | example.com/who/what/where/ |
| 203 | | |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 204 | | By default CodeIgniter enables access to the $_GET array. If for some |
Dan Horrigan | 65d603e | 2010-12-15 08:38:30 -0500 | [diff] [blame] | 205 | | reason you would like to disable it, set 'allow_get_array' to FALSE. |
| 206 | | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 207 | | You can optionally enable standard query string based URLs: |
| 208 | | example.com?who=me&what=something&where=here |
| 209 | | |
| 210 | | Options are: TRUE or FALSE (boolean) |
| 211 | | |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 212 | | The other items let you set the query string 'words' that will |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 213 | | invoke your controllers and its functions: |
| 214 | | example.com/index.php?c=controller&m=function |
| 215 | | |
| 216 | | Please note that some of the helpers won't work as expected when |
| 217 | | this feature is enabled, since CodeIgniter is designed primarily to |
| 218 | | use segment based URLs. |
| 219 | | |
| 220 | */ |
Andrey Andreev | 81c9347 | 2014-11-11 12:36:30 +0200 | [diff] [blame] | 221 | $config['allow_get_array'] = TRUE; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 222 | $config['enable_query_strings'] = FALSE; |
Andrey Andreev | 81c9347 | 2014-11-11 12:36:30 +0200 | [diff] [blame] | 223 | $config['controller_trigger'] = 'c'; |
| 224 | $config['function_trigger'] = 'm'; |
| 225 | $config['directory_trigger'] = 'd'; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 226 | |
| 227 | /* |
| 228 | |-------------------------------------------------------------------------- |
| 229 | | Error Logging Threshold |
| 230 | |-------------------------------------------------------------------------- |
| 231 | | |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 232 | | If you have enabled error logging, you can set an error threshold to |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 233 | | determine what gets logged. Threshold options are: |
| 234 | | You can enable error logging by setting a threshold over zero. The |
| 235 | | threshold determines what gets logged. Threshold options are: |
| 236 | | |
| 237 | | 0 = Disables logging, Error logging TURNED OFF |
| 238 | | 1 = Error Messages (including PHP errors) |
| 239 | | 2 = Debug Messages |
| 240 | | 3 = Informational Messages |
| 241 | | 4 = All Messages |
| 242 | | |
Nithin | 333f9f9 | 2011-08-21 16:52:06 -0400 | [diff] [blame] | 243 | | You can also pass in a array with threshold levels to show individual error types |
Iban Eguia | 8310595 | 2012-03-27 18:18:15 +0200 | [diff] [blame] | 244 | | |
Nithin | 333f9f9 | 2011-08-21 16:52:06 -0400 | [diff] [blame] | 245 | | array(2) = Debug Messages, without Error Messages |
| 246 | | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 247 | | For a live site you'll usually only enable Errors (1) to be logged otherwise |
| 248 | | your log files will fill up very fast. |
| 249 | | |
| 250 | */ |
| 251 | $config['log_threshold'] = 0; |
| 252 | |
| 253 | /* |
| 254 | |-------------------------------------------------------------------------- |
| 255 | | Error Logging Directory Path |
| 256 | |-------------------------------------------------------------------------- |
| 257 | | |
| 258 | | Leave this BLANK unless you would like to set something other than the default |
vlakoff | 6cf456d | 2014-04-14 14:38:29 +0200 | [diff] [blame] | 259 | | application/logs/ directory. Use a full server path with trailing slash. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 260 | | |
| 261 | */ |
| 262 | $config['log_path'] = ''; |
| 263 | |
| 264 | /* |
| 265 | |-------------------------------------------------------------------------- |
Chris Passas | 0bd6b28 | 2013-02-13 14:16:18 -0500 | [diff] [blame] | 266 | | Log File Extension |
| 267 | |-------------------------------------------------------------------------- |
| 268 | | |
Andrey Andreev | a107a0f | 2013-02-15 22:30:31 +0200 | [diff] [blame] | 269 | | The default filename extension for log files. The default 'php' allows for |
| 270 | | protecting the log files via basic scripting, when they are to be stored |
| 271 | | under a publicly accessible directory. |
| 272 | | |
| 273 | | Note: Leaving it blank will default to 'php'. |
Chris Passas | 0bd6b28 | 2013-02-13 14:16:18 -0500 | [diff] [blame] | 274 | | |
| 275 | */ |
| 276 | $config['log_file_extension'] = ''; |
| 277 | |
| 278 | /* |
| 279 | |-------------------------------------------------------------------------- |
Andrey Andreev | 4596574 | 2014-08-27 20:40:11 +0300 | [diff] [blame] | 280 | | Log File Permissions |
| 281 | |-------------------------------------------------------------------------- |
| 282 | | |
| 283 | | The file system permissions to be applied on newly created log files. |
| 284 | | |
| 285 | | IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal |
| 286 | | integer notation (i.e. 0700, 0644, etc.) |
| 287 | */ |
| 288 | $config['log_file_permissions'] = 0644; |
| 289 | |
| 290 | /* |
| 291 | |-------------------------------------------------------------------------- |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 292 | | Date Format for Logs |
| 293 | |-------------------------------------------------------------------------- |
| 294 | | |
| 295 | | Each item that is logged has an associated date. You can use PHP date |
| 296 | | codes to set your own date formatting |
| 297 | | |
| 298 | */ |
| 299 | $config['log_date_format'] = 'Y-m-d H:i:s'; |
| 300 | |
| 301 | /* |
| 302 | |-------------------------------------------------------------------------- |
vlakoff | 511a6b8 | 2014-04-14 14:33:55 +0200 | [diff] [blame] | 303 | | Error Views Directory Path |
vlakoff | cdf3dfa | 2014-04-12 07:33:42 +0200 | [diff] [blame] | 304 | |-------------------------------------------------------------------------- |
| 305 | | |
| 306 | | Leave this BLANK unless you would like to set something other than the default |
vlakoff | 6cf456d | 2014-04-14 14:38:29 +0200 | [diff] [blame] | 307 | | application/views/errors/ directory. Use a full server path with trailing slash. |
vlakoff | cdf3dfa | 2014-04-12 07:33:42 +0200 | [diff] [blame] | 308 | | |
| 309 | */ |
vlakoff | 511a6b8 | 2014-04-14 14:33:55 +0200 | [diff] [blame] | 310 | $config['error_views_path'] = ''; |
vlakoff | cdf3dfa | 2014-04-12 07:33:42 +0200 | [diff] [blame] | 311 | |
| 312 | /* |
| 313 | |-------------------------------------------------------------------------- |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 314 | | Cache Directory Path |
| 315 | |-------------------------------------------------------------------------- |
| 316 | | |
| 317 | | Leave this BLANK unless you would like to set something other than the default |
vlakoff | 6cf456d | 2014-04-14 14:38:29 +0200 | [diff] [blame] | 318 | | application/cache/ directory. Use a full server path with trailing slash. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 319 | | |
| 320 | */ |
| 321 | $config['cache_path'] = ''; |
| 322 | |
| 323 | /* |
| 324 | |-------------------------------------------------------------------------- |
Andrey Andreev | a704aa7 | 2014-12-04 12:37:07 +0200 | [diff] [blame] | 325 | | Cache Include Query String |
| 326 | |-------------------------------------------------------------------------- |
| 327 | | |
| 328 | | Set this to TRUE if you want to use different cache files depending on the |
| 329 | | URL query string. Please be aware this might result in numerous cache files. |
| 330 | | |
| 331 | */ |
| 332 | $config['cache_query_string'] = FALSE; |
| 333 | |
| 334 | /* |
| 335 | |-------------------------------------------------------------------------- |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 336 | | Encryption Key |
| 337 | |-------------------------------------------------------------------------- |
| 338 | | |
Andrey Andreev | 9e82b0d | 2015-01-19 13:26:46 +0200 | [diff] [blame^] | 339 | | If you use the Encryption class, you must set the an encryption key. |
| 340 | | See the user guide for more info. |
Iban Eguia | 8310595 | 2012-03-27 18:18:15 +0200 | [diff] [blame] | 341 | | |
Kyle Ridolfo | 6a33e55 | 2011-10-27 15:40:06 -0300 | [diff] [blame] | 342 | | http://codeigniter.com/user_guide/libraries/encryption.html |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 343 | | |
| 344 | */ |
Phil Sturgeon | 4df8b22 | 2010-12-15 14:23:14 +0000 | [diff] [blame] | 345 | $config['encryption_key'] = ''; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 346 | |
| 347 | /* |
| 348 | |-------------------------------------------------------------------------- |
| 349 | | Session Variables |
| 350 | |-------------------------------------------------------------------------- |
| 351 | | |
Andrey Andreev | dfb39be | 2014-10-06 01:50:14 +0300 | [diff] [blame] | 352 | | 'sess_driver' |
| 353 | | |
Andrey Andreev | a8f29f9 | 2014-11-10 18:55:55 +0200 | [diff] [blame] | 354 | | The storage driver to use: files, database, redis, memcached |
Andrey Andreev | dfb39be | 2014-10-06 01:50:14 +0300 | [diff] [blame] | 355 | | |
| 356 | | 'sess_cookie_name' |
| 357 | | |
| 358 | | The session cookie name, must contain only [0-9a-z_-] characters |
| 359 | | |
| 360 | | 'sess_expiration' |
| 361 | | |
| 362 | | The number of SECONDS you want the session to last. |
| 363 | | Setting to 0 (zero) means expire when the browser is closed. |
| 364 | | |
| 365 | | 'sess_save_path' |
| 366 | | |
Andrey Andreev | 973a654 | 2015-01-19 13:25:24 +0200 | [diff] [blame] | 367 | | The location to save sessions to, driver dependant |
| 368 | | |
| 369 | | For the 'files' driver, it's a path to a directory. |
| 370 | | For the 'database' driver, it's a table name. |
| 371 | | Please read up the manual for the format with other session drivers. |
Andrey Andreev | dfb39be | 2014-10-06 01:50:14 +0300 | [diff] [blame] | 372 | | |
| 373 | | 'sess_match_ip' |
| 374 | | |
| 375 | | Whether to match the user's IP address when reading the session data. |
| 376 | | |
| 377 | | 'sess_time_to_update' |
| 378 | | |
| 379 | | How many seconds between CI regenerating the session ID. |
| 380 | | |
| 381 | | Other session cookie settings are shared with the rest of the application, |
Andrey Andreev | 973a654 | 2015-01-19 13:25:24 +0200 | [diff] [blame] | 382 | | except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 383 | | |
| 384 | */ |
Andrey Andreev | dfb39be | 2014-10-06 01:50:14 +0300 | [diff] [blame] | 385 | $config['sess_driver'] = 'files'; |
| 386 | $config['sess_cookie_name'] = 'ci_session'; |
| 387 | $config['sess_expiration'] = 7200; |
| 388 | $config['sess_save_path'] = NULL; |
| 389 | $config['sess_match_ip'] = FALSE; |
| 390 | $config['sess_time_to_update'] = 300; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 391 | |
| 392 | /* |
| 393 | |-------------------------------------------------------------------------- |
| 394 | | Cookie Related Variables |
| 395 | |-------------------------------------------------------------------------- |
| 396 | | |
Andrey Andreev | 973a654 | 2015-01-19 13:25:24 +0200 | [diff] [blame] | 397 | | 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions |
| 398 | | 'cookie_domain' = Set to .your-domain.com for site-wide cookies |
| 399 | | 'cookie_path' = Typically will be a forward slash |
| 400 | | 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. |
Iban Eguia | 8310595 | 2012-03-27 18:18:15 +0200 | [diff] [blame] | 401 | | 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 402 | | |
Andrey Andreev | 973a654 | 2015-01-19 13:25:24 +0200 | [diff] [blame] | 403 | | Note: These settings (with the exception of 'cookie_prefix' and |
| 404 | | 'cookie_httponly') will also affect sessions. |
| 405 | | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 406 | */ |
Dumk0 | d55f749 | 2012-07-03 11:21:45 +0300 | [diff] [blame] | 407 | $config['cookie_prefix'] = ''; |
| 408 | $config['cookie_domain'] = ''; |
| 409 | $config['cookie_path'] = '/'; |
Robin Sowell | d6d9f45 | 2011-02-11 15:31:27 -0500 | [diff] [blame] | 410 | $config['cookie_secure'] = FALSE; |
freewil | 4ad0fd8 | 2012-03-13 22:37:42 -0400 | [diff] [blame] | 411 | $config['cookie_httponly'] = FALSE; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 412 | |
| 413 | /* |
| 414 | |-------------------------------------------------------------------------- |
Andrey Andreev | bfb635b | 2014-01-08 18:32:05 +0200 | [diff] [blame] | 415 | | Standardize newlines |
| 416 | |-------------------------------------------------------------------------- |
| 417 | | |
| 418 | | Determines whether to standardize newline characters in input data, |
| 419 | | meaning to replace \r\n, \r, \n occurences with the PHP_EOL value. |
| 420 | | |
| 421 | | This is particularly useful for portability between UNIX-based OSes, |
| 422 | | (usually \n) and Windows (\r\n). |
| 423 | | |
| 424 | */ |
Andrey Andreev | aeed15e | 2014-04-14 16:56:23 +0300 | [diff] [blame] | 425 | $config['standardize_newlines'] = FALSE; |
Andrey Andreev | bfb635b | 2014-01-08 18:32:05 +0200 | [diff] [blame] | 426 | |
| 427 | /* |
| 428 | |-------------------------------------------------------------------------- |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 429 | | Global XSS Filtering |
| 430 | |-------------------------------------------------------------------------- |
| 431 | | |
| 432 | | Determines whether the XSS filter is always active when GET, POST or |
| 433 | | COOKIE data is encountered |
| 434 | | |
| 435 | */ |
| 436 | $config['global_xss_filtering'] = FALSE; |
| 437 | |
| 438 | /* |
| 439 | |-------------------------------------------------------------------------- |
Shane Pearson | 49ced91 | 2010-10-06 17:31:40 -0500 | [diff] [blame] | 440 | | Cross Site Request Forgery |
Derek Allard | 958543a | 2010-07-22 14:10:26 -0400 | [diff] [blame] | 441 | |-------------------------------------------------------------------------- |
Shane Pearson | 49ced91 | 2010-10-06 17:31:40 -0500 | [diff] [blame] | 442 | | Enables a CSRF cookie token to be set. When set to TRUE, token will be |
Derek Allard | 958543a | 2010-07-22 14:10:26 -0400 | [diff] [blame] | 443 | | checked on a submitted form. If you are accepting user data, it is strongly |
| 444 | | recommended CSRF protection be enabled. |
Eric Barnes | 9805ecc | 2011-01-16 23:35:16 -0500 | [diff] [blame] | 445 | | |
| 446 | | 'csrf_token_name' = The token name |
| 447 | | 'csrf_cookie_name' = The cookie name |
| 448 | | 'csrf_expire' = The number in seconds the token should expire. |
RS71 | 4b2e9fe | 2011-12-31 16:02:50 -0200 | [diff] [blame] | 449 | | 'csrf_regenerate' = Regenerate token on every submission |
Alex Bilbie | aeb2c3e | 2011-08-21 16:14:54 +0100 | [diff] [blame] | 450 | | 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks |
Derek Allard | 958543a | 2010-07-22 14:10:26 -0400 | [diff] [blame] | 451 | */ |
| 452 | $config['csrf_protection'] = FALSE; |
Eric Barnes | 9805ecc | 2011-01-16 23:35:16 -0500 | [diff] [blame] | 453 | $config['csrf_token_name'] = 'csrf_test_name'; |
| 454 | $config['csrf_cookie_name'] = 'csrf_cookie_name'; |
| 455 | $config['csrf_expire'] = 7200; |
RS71 | 4b2e9fe | 2011-12-31 16:02:50 -0200 | [diff] [blame] | 456 | $config['csrf_regenerate'] = TRUE; |
Alex Bilbie | aeb2c3e | 2011-08-21 16:14:54 +0100 | [diff] [blame] | 457 | $config['csrf_exclude_uris'] = array(); |
Derek Allard | 958543a | 2010-07-22 14:10:26 -0400 | [diff] [blame] | 458 | |
| 459 | /* |
| 460 | |-------------------------------------------------------------------------- |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 461 | | Output Compression |
| 462 | |-------------------------------------------------------------------------- |
| 463 | | |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 464 | | Enables Gzip output compression for faster page loads. When enabled, |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 465 | | the output class will test whether your server supports Gzip. |
| 466 | | Even if it does, however, not all browsers support compression |
| 467 | | so enable only if you are reasonably sure your visitors can handle it. |
| 468 | | |
Andrey Andreev | 155ee72 | 2014-01-10 15:50:54 +0200 | [diff] [blame] | 469 | | Only used if zlib.output_compression is turned off in your php.ini. |
| 470 | | Please do not use it together with httpd-level output compression. |
| 471 | | |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 472 | | VERY IMPORTANT: If you are getting a blank page when compression is enabled it |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 473 | | means you are prematurely outputting something to your browser. It could |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 474 | | even be a line of whitespace at the end of one of your scripts. For |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 475 | | compression to work, nothing can be sent before the output buffer is called |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 476 | | by the output class. Do not 'echo' any values with compression enabled. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 477 | | |
| 478 | */ |
| 479 | $config['compress_output'] = FALSE; |
| 480 | |
| 481 | /* |
| 482 | |-------------------------------------------------------------------------- |
| 483 | | Master Time Reference |
| 484 | |-------------------------------------------------------------------------- |
| 485 | | |
Andrey Andreev | d163e0b | 2012-06-14 03:09:53 +0300 | [diff] [blame] | 486 | | Options are 'local' or any PHP supported timezone. This preference tells |
| 487 | | the system whether to use your server's local time as the master 'now' |
| 488 | | reference, or convert it to the configured one timezone. See the 'date |
Iban Eguia | 7400965 | 2012-06-13 22:57:50 +0200 | [diff] [blame] | 489 | | helper' page of the user guide for information regarding date handling. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 490 | | |
| 491 | */ |
| 492 | $config['time_reference'] = 'local'; |
| 493 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 494 | /* |
| 495 | |-------------------------------------------------------------------------- |
| 496 | | Rewrite PHP Short Tags |
| 497 | |-------------------------------------------------------------------------- |
| 498 | | |
| 499 | | If your PHP installation does not have short tag support enabled CI |
| 500 | | can rewrite the tags on-the-fly, enabling you to utilize that syntax |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 501 | | in your view files. Options are TRUE or FALSE (boolean) |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 502 | | |
| 503 | */ |
| 504 | $config['rewrite_short_tags'] = FALSE; |
| 505 | |
| 506 | |
Derek Jones | c597228 | 2009-02-04 21:40:20 +0000 | [diff] [blame] | 507 | /* |
| 508 | |-------------------------------------------------------------------------- |
| 509 | | Reverse Proxy IPs |
| 510 | |-------------------------------------------------------------------------- |
| 511 | | |
Andrey Andreev | 9ac557f | 2012-10-06 20:27:57 +0300 | [diff] [blame] | 512 | | If your server is behind a reverse proxy, you must whitelist the proxy |
| 513 | | IP addresses from which CodeIgniter should trust headers such as |
| 514 | | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify |
| 515 | | the visitor's IP address. |
Derek Jones | c597228 | 2009-02-04 21:40:20 +0000 | [diff] [blame] | 516 | | |
Andrey Andreev | 9ac557f | 2012-10-06 20:27:57 +0300 | [diff] [blame] | 517 | | You can use both an array or a comma-separated list of proxy addresses, |
| 518 | | as well as specifying whole subnets. Here are a few examples: |
| 519 | | |
| 520 | | Comma-separated: '10.0.1.200,192.168.5.0/24' |
| 521 | | Array: array('10.0.1.200', '192.168.5.0/24') |
Derek Jones | c597228 | 2009-02-04 21:40:20 +0000 | [diff] [blame] | 522 | */ |
| 523 | $config['proxy_ips'] = ''; |
| 524 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 525 | |
| 526 | /* End of file config.php */ |
Andrey Andreev | 9c98991 | 2013-09-14 20:55:12 +0300 | [diff] [blame] | 527 | /* Location: ./application/config/config.php */ |