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