blob: 20e66eab2eb41b0dd297194a3214084626f106e6 [file] [log] [blame]
darwineld8bef8a2014-02-11 20:13:22 +01001<?php
darwineld8bef8a2014-02-11 20:13:22 +01002defined('BASEPATH') OR exit('No direct script access allowed');
3
Derek Allard2067d1a2008-11-13 22:59:24 +00004/*
5| -------------------------------------------------------------------
6| DATABASE CONNECTIVITY SETTINGS
7| -------------------------------------------------------------------
8| This file will contain the settings needed to access your database.
9|
Derek Allardb76fedd2010-08-12 16:14:10 -040010| For complete instructions please consult the 'Database Connection'
Derek Allard2067d1a2008-11-13 22:59:24 +000011| page of the User Guide.
12|
13| -------------------------------------------------------------------
14| EXPLANATION OF VARIABLES
15| -------------------------------------------------------------------
16|
Taufan Aditya0142f702012-02-09 16:10:49 +070017| ['dsn'] The full DSN string describe a connection to the database.
Derek Allard2067d1a2008-11-13 22:59:24 +000018| ['hostname'] The hostname of your database server.
19| ['username'] The username used to connect to the database
20| ['password'] The password used to connect to the database
21| ['database'] The name of the database you want to connect to
Andrey Andreev26086872012-07-05 11:21:58 +030022| ['dbdriver'] The database driver. e.g.: mysqli.
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030023| Currently supported:
Andrey Andreev26086872012-07-05 11:21:58 +030024| cubrid, ibase, mssql, mysql, mysqli, oci8,
Timothy Warren43481d02012-04-17 09:17:40 -040025| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
Derek Allard2067d1a2008-11-13 22:59:24 +000026| ['dbprefix'] You can add an optional prefix, which will be added
Jamie Rumbelow7efad202012-02-19 12:37:00 +000027| to the table name when using the Query Builder class
Derek Allard2067d1a2008-11-13 22:59:24 +000028| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
29| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
30| ['cache_on'] TRUE/FALSE - Enables/disables query caching
31| ['cachedir'] The path to the folder where cache files should be stored
32| ['char_set'] The character set used in communicating with the database
33| ['dbcollat'] The character collation used in communicating with the database
Derek Jones6ae70cc2011-04-19 16:13:48 -050034| NOTE: For MySQL and MySQLi databases, this setting is only used
Derek Jones3b9f88d2011-05-20 10:25:13 -050035| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
36| (and in table creation queries made with DB Forge).
Derek Jones6ae70cc2011-04-19 16:13:48 -050037| There is an incompatibility in PHP with mysql_real_escape_string() which
38| can make your site vulnerable to SQL injection if you are using a
39| multi-byte character set and are running versions lower than these.
40| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
Derek Jonesad1171a2010-03-10 14:18:38 -060041| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030042| ['encrypt'] Whether or not to use an encrypted connection.
43| ['compress'] Whether or not to use client compression (MySQL only)
Derek Allardb76fedd2010-08-12 16:14:10 -040044| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
Derek Jonesc34e5782010-03-02 17:35:55 -060045| - good for ensuring strict SQL while developing
Tim Nolte52ec8252015-06-18 15:33:00 -040046| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
Felix Balfoort5d581b62011-11-29 15:53:01 +010047| ['failover'] array - A array with 0 or more data for connections if the main should fail.
Andrey Andreev1c8245a2014-01-20 10:28:20 +020048| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
49| NOTE: Disabling this will also effectively disable both
50| $this->db->last_query() and profiling of DB queries.
51| When you run a query, with this setting set to TRUE (default),
52| CodeIgniter will store the SQL statement for debugging purposes.
53| However, this may cause high memory usage, especially if you run
54| a lot of SQL queries ... disable this to avoid that problem.
Derek Allard2067d1a2008-11-13 22:59:24 +000055|
56| The $active_group variable lets you choose which connection group to
Derek Jones37f4b9c2011-07-01 17:56:50 -050057| make active. By default there is only one group (the 'default' group).
Derek Allard2067d1a2008-11-13 22:59:24 +000058|
Jamie Rumbelow7efad202012-02-19 12:37:00 +000059| The $query_builder variables lets you determine whether or not to load
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030060| the query builder class.
Derek Allard2067d1a2008-11-13 22:59:24 +000061*/
62
Derek Allardb76fedd2010-08-12 16:14:10 -040063$active_group = 'default';
Jamie Rumbelow7efad202012-02-19 12:37:00 +000064$query_builder = TRUE;
Derek Allard2067d1a2008-11-13 22:59:24 +000065
Timothy Warrend294a582012-04-04 13:28:39 -040066$db['default'] = array(
67 'dsn' => '',
68 'hostname' => 'localhost',
69 'username' => '',
70 'password' => '',
71 'database' => '',
72 'dbdriver' => 'mysqli',
73 'dbprefix' => '',
Andrey Andreev47a47fb2014-05-31 16:08:30 +030074 'pconnect' => FALSE,
Andrey Andreev13e8db62015-05-27 15:01:55 +030075 'db_debug' => (ENVIRONMENT !== 'production'),
Timothy Warrend294a582012-04-04 13:28:39 -040076 'cache_on' => FALSE,
77 'cachedir' => '',
78 'char_set' => 'utf8',
79 'dbcollat' => 'utf8_general_ci',
80 'swap_pre' => '',
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030081 'encrypt' => FALSE,
82 'compress' => FALSE,
Timothy Warrend294a582012-04-04 13:28:39 -040083 'stricton' => FALSE,
Tim Nolteced557b2015-06-18 15:28:43 -040084 'ssl_options' => array(),
Andrey Andreev1c8245a2014-01-20 10:28:20 +020085 'failover' => array(),
86 'save_queries' => TRUE
Timothy Warrend294a582012-04-04 13:28:39 -040087);