blob: 44fe307d6f860618f1f35b728b3eec913a1f6c89 [file] [log] [blame]
Andrey Andreeve734b382012-03-26 13:42:36 +03001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Derek Jonesf4a4bd82011-10-20 12:18:42 -05002/**
3 * CodeIgniter
4 *
Phil Sturgeon07c1ac82012-03-09 17:03:37 +00005 * An open source application development framework for PHP 5.2.4 or newer
Derek Jonesf4a4bd82011-10-20 12:18:42 -05006 *
7 * NOTICE OF LICENSE
Andrey Andreeve734b382012-03-26 13:42:36 +03008 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05009 * Licensed under the Academic Free License version 3.0
Andrey Andreeve734b382012-03-26 13:42:36 +030010 *
Derek Jones61df9062011-10-21 09:55:40 -050011 * This source file is subject to the Academic Free License (AFL 3.0) that is
Derek Jonesf4a4bd82011-10-20 12:18:42 -050012 * bundled with this package in the files license_afl.txt / license_afl.rst.
13 * It is also available through the world wide web at this URL:
14 * http://opensource.org/licenses/AFL-3.0
15 * If you did not receive a copy of the license and are unable to obtain it
16 * through the world wide web, please send an email to
17 * licensing@ellislab.com so we can send you a copy immediately.
18 *
19 * @package CodeIgniter
20 * @author EllisLab Dev Team
Andrey Andreev80500af2013-01-01 08:16:53 +020021 * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/)
Derek Jonesf4a4bd82011-10-20 12:18:42 -050022 * @license http://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0)
23 * @link http://codeigniter.com
24 * @since Version 1.0
25 * @filesource
26 */
Derek Allard2067d1a2008-11-13 22:59:24 +000027/*
28| -------------------------------------------------------------------
29| DATABASE CONNECTIVITY SETTINGS
30| -------------------------------------------------------------------
31| This file will contain the settings needed to access your database.
32|
Derek Allardb76fedd2010-08-12 16:14:10 -040033| For complete instructions please consult the 'Database Connection'
Derek Allard2067d1a2008-11-13 22:59:24 +000034| page of the User Guide.
35|
36| -------------------------------------------------------------------
37| EXPLANATION OF VARIABLES
38| -------------------------------------------------------------------
39|
Taufan Aditya0142f702012-02-09 16:10:49 +070040| ['dsn'] The full DSN string describe a connection to the database.
Derek Allard2067d1a2008-11-13 22:59:24 +000041| ['hostname'] The hostname of your database server.
42| ['username'] The username used to connect to the database
43| ['password'] The password used to connect to the database
44| ['database'] The name of the database you want to connect to
Andrey Andreev26086872012-07-05 11:21:58 +030045| ['dbdriver'] The database driver. e.g.: mysqli.
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030046| Currently supported:
Andrey Andreev26086872012-07-05 11:21:58 +030047| cubrid, ibase, mssql, mysql, mysqli, oci8,
Timothy Warren43481d02012-04-17 09:17:40 -040048| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
Derek Allard2067d1a2008-11-13 22:59:24 +000049| ['dbprefix'] You can add an optional prefix, which will be added
Jamie Rumbelow7efad202012-02-19 12:37:00 +000050| to the table name when using the Query Builder class
Derek Allard2067d1a2008-11-13 22:59:24 +000051| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
52| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
53| ['cache_on'] TRUE/FALSE - Enables/disables query caching
54| ['cachedir'] The path to the folder where cache files should be stored
55| ['char_set'] The character set used in communicating with the database
56| ['dbcollat'] The character collation used in communicating with the database
Derek Jones6ae70cc2011-04-19 16:13:48 -050057| NOTE: For MySQL and MySQLi databases, this setting is only used
Derek Jones3b9f88d2011-05-20 10:25:13 -050058| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
59| (and in table creation queries made with DB Forge).
Derek Jones6ae70cc2011-04-19 16:13:48 -050060| There is an incompatibility in PHP with mysql_real_escape_string() which
61| can make your site vulnerable to SQL injection if you are using a
62| multi-byte character set and are running versions lower than these.
63| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
Derek Jonesad1171a2010-03-10 14:18:38 -060064| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
65| ['autoinit'] Whether or not to automatically initialize the database.
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030066| ['encrypt'] Whether or not to use an encrypted connection.
67| ['compress'] Whether or not to use client compression (MySQL only)
Derek Allardb76fedd2010-08-12 16:14:10 -040068| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
Derek Jonesc34e5782010-03-02 17:35:55 -060069| - good for ensuring strict SQL while developing
Felix Balfoort5d581b62011-11-29 15:53:01 +010070| ['failover'] array - A array with 0 or more data for connections if the main should fail.
Andrey Andreev1c8245a2014-01-20 10:28:20 +020071| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
72| NOTE: Disabling this will also effectively disable both
73| $this->db->last_query() and profiling of DB queries.
74| When you run a query, with this setting set to TRUE (default),
75| CodeIgniter will store the SQL statement for debugging purposes.
76| However, this may cause high memory usage, especially if you run
77| a lot of SQL queries ... disable this to avoid that problem.
Derek Allard2067d1a2008-11-13 22:59:24 +000078|
79| The $active_group variable lets you choose which connection group to
Derek Jones37f4b9c2011-07-01 17:56:50 -050080| make active. By default there is only one group (the 'default' group).
Derek Allard2067d1a2008-11-13 22:59:24 +000081|
Jamie Rumbelow7efad202012-02-19 12:37:00 +000082| The $query_builder variables lets you determine whether or not to load
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +030083| the query builder class.
Derek Allard2067d1a2008-11-13 22:59:24 +000084*/
85
Derek Allardb76fedd2010-08-12 16:14:10 -040086$active_group = 'default';
Jamie Rumbelow7efad202012-02-19 12:37:00 +000087$query_builder = TRUE;
Derek Allard2067d1a2008-11-13 22:59:24 +000088
Timothy Warrend294a582012-04-04 13:28:39 -040089$db['default'] = array(
90 'dsn' => '',
91 'hostname' => 'localhost',
92 'username' => '',
93 'password' => '',
94 'database' => '',
95 'dbdriver' => 'mysqli',
96 'dbprefix' => '',
Andrey Andreevde6eff02012-06-26 18:13:13 +030097 'pconnect' => TRUE,
Timothy Warrend294a582012-04-04 13:28:39 -040098 'db_debug' => TRUE,
99 'cache_on' => FALSE,
100 'cachedir' => '',
101 'char_set' => 'utf8',
102 'dbcollat' => 'utf8_general_ci',
103 'swap_pre' => '',
104 'autoinit' => TRUE,
Andrey Andreev2f8bf9b2012-10-12 20:37:52 +0300105 'encrypt' => FALSE,
106 'compress' => FALSE,
Timothy Warrend294a582012-04-04 13:28:39 -0400107 'stricton' => FALSE,
Andrey Andreev1c8245a2014-01-20 10:28:20 +0200108 'failover' => array(),
109 'save_queries' => TRUE
Timothy Warrend294a582012-04-04 13:28:39 -0400110);
Derek Allard2067d1a2008-11-13 22:59:24 +0000111
112/* End of file database.php */
Derek Jonesf0b39942010-03-25 10:08:20 -0500113/* Location: ./application/config/database.php */