blob: 01eb5b4b2a438687dab5eb4a2520578093f6044b [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
Andrey Andreev23aa1662017-10-09 10:57:57 +030050| 'ssl_capath' - Path to a directory containing trusted CA certificates 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 Andreevf1e13c02018-08-22 15:01:20 +030052| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not
Andrey Andreev76e643e2015-07-16 13:14:49 +030053|
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030054| ['compress'] Whether or not to use client compression (MySQL only)
Derek Allardb76fedd2010-08-12 16:14:10 -040055| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
Derek Jonesc34e5782010-03-02 17:35:55 -060056| - good for ensuring strict SQL while developing
Tim Nolte52ec8252015-06-18 15:33:00 -040057| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
Felix Balfoort5d581b62011-11-29 15:53:01 +010058| ['failover'] array - A array with 0 or more data for connections if the main should fail.
Andrey Andreev1c8245a2014-01-20 10:28:20 +020059| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
60| NOTE: Disabling this will also effectively disable both
61| $this->db->last_query() and profiling of DB queries.
62| When you run a query, with this setting set to TRUE (default),
63| CodeIgniter will store the SQL statement for debugging purposes.
64| However, this may cause high memory usage, especially if you run
65| a lot of SQL queries ... disable this to avoid that problem.
Derek Allard2067d1a2008-11-13 22:59:24 +000066|
67| The $active_group variable lets you choose which connection group to
Derek Jones37f4b9c2011-07-01 17:56:50 -050068| make active. By default there is only one group (the 'default' group).
Derek Allard2067d1a2008-11-13 22:59:24 +000069|
Jamie Rumbelow7efad202012-02-19 12:37:00 +000070| The $query_builder variables lets you determine whether or not to load
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030071| the query builder class.
Derek Allard2067d1a2008-11-13 22:59:24 +000072*/
Luigi Santivetti7bab4942019-06-16 07:40:53 +000073$active_group = 'dev';
Jamie Rumbelow7efad202012-02-19 12:37:00 +000074$query_builder = TRUE;
Derek Allard2067d1a2008-11-13 22:59:24 +000075
Luigi Santivetti7bab4942019-06-16 07:40:53 +000076$db['dev'] = array(
77 'dsn' => '',
78 'hostname' => getenv('MYSQL_HOSTNAME'),
79 'username' => getenv('MYSQL_USER'),
80 'password' => getenv('MYSQL_PASSWORD'),
81 'database' => getenv('MYSQL_DATABASE'),
82 'dbdriver' => 'mysqli',
83 'dbprefix' => '',
84 'pconnect' => FALSE,
85 'db_debug' => TRUE,
86 'cache_on' => FALSE,
87 'cachedir' => '',
88 'char_set' => 'utf8',
89 'dbcollat' => 'utf8_general_ci',
90 'swap_pre' => '',
91 'encrypt' => TRUE,
92 'compress' => FALSE,
93 'stricton' => FALSE,
94 'failover' => array(),
95 'save_queries' => TRUE
96);
97
Timothy Warrend294a582012-04-04 13:28:39 -040098$db['default'] = array(
99 'dsn' => '',
100 'hostname' => 'localhost',
101 'username' => '',
102 'password' => '',
103 'database' => '',
104 'dbdriver' => 'mysqli',
105 'dbprefix' => '',
Andrey Andreev47a47fb2014-05-31 16:08:30 +0300106 'pconnect' => FALSE,
Andrey Andreev13e8db62015-05-27 15:01:55 +0300107 'db_debug' => (ENVIRONMENT !== 'production'),
Timothy Warrend294a582012-04-04 13:28:39 -0400108 'cache_on' => FALSE,
109 'cachedir' => '',
110 'char_set' => 'utf8',
111 'dbcollat' => 'utf8_general_ci',
112 'swap_pre' => '',
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +0300113 'encrypt' => FALSE,
114 'compress' => FALSE,
Timothy Warrend294a582012-04-04 13:28:39 -0400115 'stricton' => FALSE,
Andrey Andreev1c8245a2014-01-20 10:28:20 +0200116 'failover' => array(),
117 'save_queries' => TRUE
Timothy Warrend294a582012-04-04 13:28:39 -0400118);