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