Advertisement
riowinchester

config.php

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