PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/site/application/config/config.php

https://bitbucket.org/thiscode/thiscode-shop
PHP | 376 lines | 53 code | 32 blank | 291 comment | 3 complexity | f11c1ab9d831c87a7f543d635677b1b1 MD5 | raw file
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Base Site URL
  5. |--------------------------------------------------------------------------
  6. |
  7. | URL to your CodeIgniter root. Typically this will be your base URL,
  8. | WITH a trailing slash:
  9. |
  10. | http://example.com/
  11. |
  12. | If this is not set then CodeIgniter will guess the protocol, domain and
  13. | path to your installation.
  14. |
  15. */
  16. if(preg_match('/local\.dev/',$_SERVER['SERVER_NAME']))
  17. {
  18. // Dev config
  19. $_port = '';
  20. if($_SERVER['SERVER_PORT'] !== '80') $_port = ':'.$_SERVER['SERVER_PORT'];
  21. $config['base_url'] = 'http://local.dev'.$_port;
  22. $config['admin_url'] = 'http://local.dev'.$_port.'/secure/';
  23. }
  24. else
  25. {
  26. // Live config
  27. $config['base_url'] = 'http://www.tempouk.org';
  28. $config['admin_url'] = 'https://www.tempouk.org/secure/';
  29. }
  30. /*
  31. |--------------------------------------------------------------------------
  32. | Index File
  33. |--------------------------------------------------------------------------
  34. |
  35. | Typically this will be your index.php file, unless you've renamed it to
  36. | something else. If you are using mod_rewrite to remove the page set this
  37. | variable so that it is blank.
  38. |
  39. */
  40. $config['index_page'] = '';
  41. /*
  42. |--------------------------------------------------------------------------
  43. | URI PROTOCOL
  44. |--------------------------------------------------------------------------
  45. |
  46. | This item determines which server global should be used to retrieve the
  47. | URI string. The default setting of 'AUTO' works for most servers.
  48. | If your links do not seem to work, try one of the other delicious flavors:
  49. |
  50. | 'AUTO' Default - auto detects
  51. | 'PATH_INFO' Uses the PATH_INFO
  52. | 'QUERY_STRING' Uses the QUERY_STRING
  53. | 'REQUEST_URI' Uses the REQUEST_URI
  54. | 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
  55. |
  56. */
  57. $config['uri_protocol'] = 'PATH_INFO';
  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. |
  66. | http://codeigniter.com/user_guide/general/urls.html
  67. */
  68. $config['url_suffix'] = '';
  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. */
  79. $config['language'] = 'english';
  80. /*
  81. |--------------------------------------------------------------------------
  82. | Default Character Set
  83. |--------------------------------------------------------------------------
  84. |
  85. | This determines which character set is used by default in various methods
  86. | that require a character set to be provided.
  87. |
  88. */
  89. $config['charset'] = 'UTF-8';
  90. /*
  91. |--------------------------------------------------------------------------
  92. | Enable/Disable System Hooks
  93. |--------------------------------------------------------------------------
  94. |
  95. | If you would like to use the 'hooks' feature you must enable it by
  96. | setting this variable to TRUE (boolean). See the user guide for details.
  97. |
  98. */
  99. $config['enable_hooks'] = true;
  100. /*
  101. |--------------------------------------------------------------------------
  102. | Class Extension Prefix
  103. |--------------------------------------------------------------------------
  104. |
  105. | This item allows you to set the filename/classname prefix when extending
  106. | native libraries. For more information please see the user guide:
  107. |
  108. | http://codeigniter.com/user_guide/general/core_classes.html
  109. | http://codeigniter.com/user_guide/general/creating_libraries.html
  110. |
  111. */
  112. $config['subclass_prefix'] = 'MY_';
  113. /*
  114. |--------------------------------------------------------------------------
  115. | Allowed URL Characters
  116. |--------------------------------------------------------------------------
  117. |
  118. | This lets you specify with a regular expression which characters are permitted
  119. | within your URLs. When someone tries to submit a URL with disallowed
  120. | characters they will get a warning message.
  121. |
  122. | As a security measure you are STRONGLY encouraged to restrict URLs to
  123. | as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
  124. |
  125. | Leave blank to allow all characters -- but only if you are insane.
  126. |
  127. | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
  128. |
  129. */
  130. $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
  131. /*
  132. |--------------------------------------------------------------------------
  133. | Enable Query Strings
  134. |--------------------------------------------------------------------------
  135. |
  136. | By default CodeIgniter uses search-engine friendly segment based URLs:
  137. | example.com/who/what/where/
  138. |
  139. | By default CodeIgniter enables access to the $_GET array. If for some
  140. | reason you would like to disable it, set 'allow_get_array' to FALSE.
  141. |
  142. | You can optionally enable standard query string based URLs:
  143. | example.com?who=me&what=something&where=here
  144. |
  145. | Options are: TRUE or FALSE (boolean)
  146. |
  147. | The other items let you set the query string 'words' that will
  148. | invoke your controllers and its functions:
  149. | example.com/index.php?c=controller&m=function
  150. |
  151. | Please note that some of the helpers won't work as expected when
  152. | this feature is enabled, since CodeIgniter is designed primarily to
  153. | use segment based URLs.
  154. |
  155. */
  156. $config['allow_get_array'] = TRUE;
  157. $config['enable_query_strings'] = FALSE;
  158. $config['controller_trigger'] = 'c';
  159. $config['function_trigger'] = 'm';
  160. $config['directory_trigger'] = 'd'; // experimental not currently in use
  161. /*
  162. |--------------------------------------------------------------------------
  163. | Error Logging Threshold
  164. |--------------------------------------------------------------------------
  165. |
  166. | If you have enabled error logging, you can set an error threshold to
  167. | determine what gets logged. Threshold options are:
  168. | You can enable error logging by setting a threshold over zero. The
  169. | threshold determines what gets logged. Threshold options are:
  170. |
  171. | 0 = Disables logging, Error logging TURNED OFF
  172. | 1 = Error Messages (including PHP errors)
  173. | 2 = Debug Messages
  174. | 3 = Informational Messages
  175. | 4 = All Messages
  176. |
  177. | For a live site you'll usually only enable Errors (1) to be logged otherwise
  178. | your log files will fill up very fast.
  179. |
  180. */
  181. $config['log_threshold'] = 0;
  182. /*
  183. |--------------------------------------------------------------------------
  184. | Error Logging Directory Path
  185. |--------------------------------------------------------------------------
  186. |
  187. | Leave this BLANK unless you would like to set something other than the default
  188. | application/logs/ folder. Use a full server path with trailing slash.
  189. |
  190. */
  191. $config['log_path'] = '';
  192. /*
  193. |--------------------------------------------------------------------------
  194. | Date Format for Logs
  195. |--------------------------------------------------------------------------
  196. |
  197. | Each item that is logged has an associated date. You can use PHP date
  198. | codes to set your own date formatting
  199. |
  200. */
  201. $config['log_date_format'] = 'Y-m-d H:i:s';
  202. /*
  203. |--------------------------------------------------------------------------
  204. | Cache Directory Path
  205. |--------------------------------------------------------------------------
  206. |
  207. | Leave this BLANK unless you would like to set something other than the default
  208. | system/cache/ folder. Use a full server path with trailing slash.
  209. |
  210. */
  211. $config['cache_path'] = '';
  212. /*
  213. |--------------------------------------------------------------------------
  214. | Encryption Key
  215. |--------------------------------------------------------------------------
  216. |
  217. | If you use the Encryption class or the Session class you
  218. | MUST set an encryption key. See the user guide for info.
  219. |
  220. */
  221. $config['encryption_key'] = 'imYhkAKW2x73GnMqXe';
  222. /*
  223. |--------------------------------------------------------------------------
  224. | Session Variables
  225. |--------------------------------------------------------------------------
  226. |
  227. | 'sess_cookie_name' = the name you want for the cookie
  228. | 'sess_expiration' = the number of SECONDS you want the session to last.
  229. | by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
  230. | 'sess_expire_on_close' = Whether to cause the session to expire automatically
  231. | when the browser window is closed
  232. | 'sess_encrypt_cookie' = Whether to encrypt the cookie
  233. | 'sess_use_database' = Whether to save the session data to a database
  234. | 'sess_table_name' = The name of the session database table
  235. | 'sess_match_ip' = Whether to match the user's IP address when reading the session data
  236. | 'sess_match_useragent' = Whether to match the User Agent when reading the session data
  237. | 'sess_time_to_update' = how many seconds between CI refreshing Session Information
  238. |
  239. */
  240. $config['sess_cookie_name'] = 'ci_session';
  241. $config['sess_expiration'] = 7200;
  242. $config['sess_expire_on_close'] = TRUE;
  243. $config['sess_encrypt_cookie'] = TRUE;
  244. $config['sess_use_database'] = TRUE;
  245. $config['sess_table_name'] = '_ci_sessions';
  246. $config['sess_match_ip'] = TRUE;
  247. $config['sess_match_useragent'] = TRUE;
  248. $config['sess_time_to_update'] = 300;
  249. /*
  250. |--------------------------------------------------------------------------
  251. | Cookie Related Variables
  252. |--------------------------------------------------------------------------
  253. |
  254. | 'cookie_prefix' = Set a prefix if you need to avoid collisions
  255. | 'cookie_domain' = Set to .your-domain.com for site-wide cookies
  256. | 'cookie_path' = Typically will be a forward slash
  257. | 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
  258. |
  259. */
  260. $config['cookie_prefix'] = "";
  261. $config['cookie_domain'] = "";
  262. $config['cookie_path'] = "/";
  263. $config['cookie_secure'] = FALSE;
  264. /*
  265. |--------------------------------------------------------------------------
  266. | Global XSS Filtering
  267. |--------------------------------------------------------------------------
  268. |
  269. | Determines whether the XSS filter is always active when GET, POST or
  270. | COOKIE data is encountered
  271. |
  272. */
  273. $config['global_xss_filtering'] = FALSE;
  274. /*
  275. |--------------------------------------------------------------------------
  276. | Cross Site Request Forgery
  277. |--------------------------------------------------------------------------
  278. | Enables a CSRF cookie token to be set. When set to TRUE, token will be
  279. | checked on a submitted form. If you are accepting user data, it is strongly
  280. | recommended CSRF protection be enabled.
  281. |
  282. | 'csrf_token_name' = The token name
  283. | 'csrf_cookie_name' = The cookie name
  284. | 'csrf_expire' = The number in seconds the token should expire.
  285. */
  286. $config['csrf_protection'] = FALSE;
  287. $config['csrf_token_name'] = 'csrf_test_name';
  288. $config['csrf_cookie_name'] = 'csrf_cookie_name';
  289. $config['csrf_expire'] = 7200;
  290. /*
  291. |--------------------------------------------------------------------------
  292. | Output Compression
  293. |--------------------------------------------------------------------------
  294. |
  295. | Enables Gzip output compression for faster page loads. When enabled,
  296. | the output class will test whether your server supports Gzip.
  297. | Even if it does, however, not all browsers support compression
  298. | so enable only if you are reasonably sure your visitors can handle it.
  299. |
  300. | VERY IMPORTANT: If you are getting a blank page when compression is enabled it
  301. | means you are prematurely outputting something to your browser. It could
  302. | even be a line of whitespace at the end of one of your scripts. For
  303. | compression to work, nothing can be sent before the output buffer is called
  304. | by the output class. Do not 'echo' any values with compression enabled.
  305. |
  306. */
  307. $config['compress_output'] = FALSE;
  308. /*
  309. |--------------------------------------------------------------------------
  310. | Master Time Reference
  311. |--------------------------------------------------------------------------
  312. |
  313. | Options are 'local' or 'gmt'. This pref tells the system whether to use
  314. | your server's local time as the master 'now' reference, or convert it to
  315. | GMT. See the 'date helper' page of the user guide for information
  316. | regarding date handling.
  317. |
  318. */
  319. $config['time_reference'] = 'local';
  320. /*
  321. |--------------------------------------------------------------------------
  322. | Rewrite PHP Short Tags
  323. |--------------------------------------------------------------------------
  324. |
  325. | If your PHP installation does not have short tag support enabled CI
  326. | can rewrite the tags on-the-fly, enabling you to utilize that syntax
  327. | in your view files. Options are TRUE or FALSE (boolean)
  328. |
  329. */
  330. $config['rewrite_short_tags'] = FALSE;
  331. /*
  332. |--------------------------------------------------------------------------
  333. | Reverse Proxy IPs
  334. |--------------------------------------------------------------------------
  335. |
  336. | If your server is behind a reverse proxy, you must whitelist the proxy IP
  337. | addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
  338. | header in order to properly identify the visitor's IP address.
  339. | Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
  340. |
  341. */
  342. $config['proxy_ips'] = '';
  343. /* End of file config.php */
  344. /* Location: ./application/config/config.php */