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