Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
| 2 | /* |
| 3 | | ------------------------------------------------------------------- |
| 4 | | DATABASE CONNECTIVITY SETTINGS |
| 5 | | ------------------------------------------------------------------- |
| 6 | | This file will contain the settings needed to access your database. |
| 7 | | |
Derek Allard | b76fedd | 2010-08-12 16:14:10 -0400 | [diff] [blame] | 8 | | For complete instructions please consult the 'Database Connection' |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 9 | | page of the User Guide. |
| 10 | | |
| 11 | | ------------------------------------------------------------------- |
| 12 | | EXPLANATION OF VARIABLES |
| 13 | | ------------------------------------------------------------------- |
| 14 | | |
| 15 | | ['hostname'] The hostname of your database server. |
| 16 | | ['username'] The username used to connect to the database |
| 17 | | ['password'] The password used to connect to the database |
| 18 | | ['database'] The name of the database you want to connect to |
| 19 | | ['dbdriver'] The database type. ie: mysql. Currently supported: |
| 20 | mysql, mysqli, postgre, odbc, mssql, sqlite, oci8 |
| 21 | | ['dbprefix'] You can add an optional prefix, which will be added |
| 22 | | to the table name when using the Active Record class |
| 23 | | ['pconnect'] TRUE/FALSE - Whether to use a persistent connection |
| 24 | | ['db_debug'] TRUE/FALSE - Whether database errors should be displayed. |
| 25 | | ['cache_on'] TRUE/FALSE - Enables/disables query caching |
| 26 | | ['cachedir'] The path to the folder where cache files should be stored |
| 27 | | ['char_set'] The character set used in communicating with the database |
| 28 | | ['dbcollat'] The character collation used in communicating with the database |
Derek Jones | 6ae70cc | 2011-04-19 16:13:48 -0500 | [diff] [blame^] | 29 | | NOTE: For MySQL and MySQLi databases, this setting is only used |
| 30 | | as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7. |
| 31 | | There is an incompatibility in PHP with mysql_real_escape_string() which |
| 32 | | can make your site vulnerable to SQL injection if you are using a |
| 33 | | multi-byte character set and are running versions lower than these. |
| 34 | | Sites using Latin-1 or UTF-8 database character set and collation are unaffected. |
Derek Jones | ad1171a | 2010-03-10 14:18:38 -0600 | [diff] [blame] | 35 | | ['swap_pre'] A default table prefix that should be swapped with the dbprefix |
| 36 | | ['autoinit'] Whether or not to automatically initialize the database. |
Derek Allard | b76fedd | 2010-08-12 16:14:10 -0400 | [diff] [blame] | 37 | | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections |
Derek Jones | c34e578 | 2010-03-02 17:35:55 -0600 | [diff] [blame] | 38 | | - good for ensuring strict SQL while developing |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 39 | | |
| 40 | | The $active_group variable lets you choose which connection group to |
Derek Allard | b76fedd | 2010-08-12 16:14:10 -0400 | [diff] [blame] | 41 | | make active. By default there is only one group (the 'default' group). |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 42 | | |
| 43 | | The $active_record variables lets you determine whether or not to load |
| 44 | | the active record class |
| 45 | */ |
| 46 | |
Derek Allard | b76fedd | 2010-08-12 16:14:10 -0400 | [diff] [blame] | 47 | $active_group = 'default'; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 48 | $active_record = TRUE; |
| 49 | |
Derek Allard | b76fedd | 2010-08-12 16:14:10 -0400 | [diff] [blame] | 50 | $db['default']['hostname'] = 'localhost'; |
| 51 | $db['default']['username'] = ''; |
| 52 | $db['default']['password'] = ''; |
| 53 | $db['default']['database'] = ''; |
| 54 | $db['default']['dbdriver'] = 'mysql'; |
| 55 | $db['default']['dbprefix'] = ''; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 56 | $db['default']['pconnect'] = TRUE; |
| 57 | $db['default']['db_debug'] = TRUE; |
| 58 | $db['default']['cache_on'] = FALSE; |
Derek Allard | b76fedd | 2010-08-12 16:14:10 -0400 | [diff] [blame] | 59 | $db['default']['cachedir'] = ''; |
| 60 | $db['default']['char_set'] = 'utf8'; |
| 61 | $db['default']['dbcollat'] = 'utf8_general_ci'; |
| 62 | $db['default']['swap_pre'] = ''; |
Derek Jones | ad1171a | 2010-03-10 14:18:38 -0600 | [diff] [blame] | 63 | $db['default']['autoinit'] = TRUE; |
Derek Jones | c34e578 | 2010-03-02 17:35:55 -0600 | [diff] [blame] | 64 | $db['default']['stricton'] = FALSE; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 65 | |
| 66 | |
| 67 | /* End of file database.php */ |
Derek Jones | f0b3994 | 2010-03-25 10:08:20 -0500 | [diff] [blame] | 68 | /* Location: ./application/config/database.php */ |