You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
4.4 KiB

7 years ago
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. /*
  4. | -------------------------------------------------------------------
  5. | DATABASE CONNECTIVITY SETTINGS
  6. | -------------------------------------------------------------------
  7. | This file will contain the settings needed to access your database.
  8. |
  9. | For complete instructions please consult the 'Database Connection'
  10. | page of the User Guide.
  11. |
  12. | -------------------------------------------------------------------
  13. | EXPLANATION OF VARIABLES
  14. | -------------------------------------------------------------------
  15. |
  16. | ['dsn'] The full DSN string describe a connection to the database.
  17. | ['hostname'] The hostname of your database server.
  18. | ['username'] The username used to connect to the database
  19. | ['password'] The password used to connect to the database
  20. | ['database'] The name of the database you want to connect to
  21. | ['dbdriver'] The database driver. e.g.: mysqli.
  22. | Currently supported:
  23. | cubrid, ibase, mssql, mysql, mysqli, oci8,
  24. | odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
  25. | ['dbprefix'] You can add an optional prefix, which will be added
  26. | to the table name when using the Query Builder class
  27. | ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
  28. | ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
  29. | ['cache_on'] TRUE/FALSE - Enables/disables query caching
  30. | ['cachedir'] The path to the folder where cache files should be stored
  31. | ['char_set'] The character set used in communicating with the database
  32. | ['dbcollat'] The character collation used in communicating with the database
  33. | NOTE: For MySQL and MySQLi databases, this setting is only used
  34. | as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
  35. | (and in table creation queries made with DB Forge).
  36. | There is an incompatibility in PHP with mysql_real_escape_string() which
  37. | can make your site vulnerable to SQL injection if you are using a
  38. | multi-byte character set and are running versions lower than these.
  39. | Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
  40. | ['swap_pre'] A default table prefix that should be swapped with the dbprefix
  41. | ['encrypt'] Whether or not to use an encrypted connection.
  42. |
  43. | 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
  44. | 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
  45. |
  46. | 'ssl_key' - Path to the private key file
  47. | 'ssl_cert' - Path to the public key certificate file
  48. | 'ssl_ca' - Path to the certificate authority file
  49. | 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
  50. | 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
  51. | 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
  52. |
  53. | ['compress'] Whether or not to use client compression (MySQL only)
  54. | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
  55. | - good for ensuring strict SQL while developing
  56. | ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
  57. | ['failover'] array - A array with 0 or more data for connections if the main should fail.
  58. | ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
  59. | NOTE: Disabling this will also effectively disable both
  60. | $this->db->last_query() and profiling of DB queries.
  61. | When you run a query, with this setting set to TRUE (default),
  62. | CodeIgniter will store the SQL statement for debugging purposes.
  63. | However, this may cause high memory usage, especially if you run
  64. | a lot of SQL queries ... disable this to avoid that problem.
  65. |
  66. | The $active_group variable lets you choose which connection group to
  67. | make active. By default there is only one group (the 'default' group).
  68. |
  69. | The $query_builder variables lets you determine whether or not to load
  70. | the query builder class.
  71. */
  72. $active_group = 'default';
  73. $query_builder = TRUE;
  74. $db['default'] = array(
  75. 'dsn' => '',
  76. 'hostname' => DB_HOST,
  77. 'username' => DB_USER,
  78. 'password' => DB_PASS,
  79. 'database' => DB_NAME,
  80. 'dbdriver' => 'mysqli',
  81. 'dbprefix' => 'wb_',
  82. 'pconnect' => FALSE,
  83. 'db_debug' => (ENVIRONMENT !== 'production'),
  84. 'cache_on' => FALSE,
  85. 'cachedir' => '',
  86. 'char_set' => 'utf8',
  87. 'dbcollat' => 'utf8_general_ci',
  88. 'swap_pre' => '',
  89. 'encrypt' => FALSE,
  90. 'compress' => FALSE,
  91. 'stricton' => FALSE,
  92. 'failover' => array(),
  93. 'save_queries' => TRUE
  94. );