blob: ea345ee796732b9a602a9b417ea4813b089fe3e5 [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.
Andrey Andreev76e643e2015-07-16 13:14:49 +030043|
44| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
Andrey Andreeva38b0c42015-07-16 14:25:25 +030045| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
Andrey Andreev76e643e2015-07-16 13:14:49 +030046|
47| 'ssl_key' - Path to the private key file
48| 'ssl_cert' - Path to the public key certificate file
49| 'ssl_ca' - Path to the certificate authority file
50| 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
Andrey Andreev0785e472015-07-16 13:41:55 +030051| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
Andrey Andreev76e643e2015-07-16 13:14:49 +030052|
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030053| ['compress'] Whether or not to use client compression (MySQL only)
Derek Allardb76fedd2010-08-12 16:14:10 -040054| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
Derek Jonesc34e5782010-03-02 17:35:55 -060055| - good for ensuring strict SQL while developing
Tim Nolte52ec8252015-06-18 15:33:00 -040056| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
Felix Balfoort5d581b62011-11-29 15:53:01 +010057| ['failover'] array - A array with 0 or more data for connections if the main should fail.
Andrey Andreev1c8245a2014-01-20 10:28:20 +020058| ['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.
Derek Allard2067d1a2008-11-13 22:59:24 +000065|
66| The $active_group variable lets you choose which connection group to
Derek Jones37f4b9c2011-07-01 17:56:50 -050067| make active. By default there is only one group (the 'default' group).
Derek Allard2067d1a2008-11-13 22:59:24 +000068|
Jamie Rumbelow7efad202012-02-19 12:37:00 +000069| The $query_builder variables lets you determine whether or not to load
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030070| the query builder class.
Derek Allard2067d1a2008-11-13 22:59:24 +000071*/
Derek Allardb76fedd2010-08-12 16:14:10 -040072$active_group = 'default';
Jamie Rumbelow7efad202012-02-19 12:37:00 +000073$query_builder = TRUE;
Derek Allard2067d1a2008-11-13 22:59:24 +000074
Timothy Warrend294a582012-04-04 13:28:39 -040075$db['default'] = array(
76 'dsn' => '',
77 'hostname' => 'localhost',
78 'username' => '',
79 'password' => '',
80 'database' => '',
81 'dbdriver' => 'mysqli',
82 'dbprefix' => '',
Andrey Andreev47a47fb2014-05-31 16:08:30 +030083 'pconnect' => FALSE,
Andrey Andreev13e8db62015-05-27 15:01:55 +030084 'db_debug' => (ENVIRONMENT !== 'production'),
Timothy Warrend294a582012-04-04 13:28:39 -040085 'cache_on' => FALSE,
86 'cachedir' => '',
87 'char_set' => 'utf8',
88 'dbcollat' => 'utf8_general_ci',
89 'swap_pre' => '',
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030090 'encrypt' => FALSE,
91 'compress' => FALSE,
Timothy Warrend294a582012-04-04 13:28:39 -040092 'stricton' => FALSE,
Andrey Andreev1c8245a2014-01-20 10:28:20 +020093 'failover' => array(),
94 'save_queries' => TRUE
Timothy Warrend294a582012-04-04 13:28:39 -040095);