|
@@ -1,5 +1,5 @@
|
1
|
1
|
<?php
|
2
|
|
-defined('BASEPATH') OR exit('No direct script access allowed');
|
|
2
|
+defined('BASEPATH') or exit('No direct script access allowed');
|
3
|
3
|
|
4
|
4
|
/*
|
5
|
5
|
| -------------------------------------------------------------------
|
|
@@ -14,83 +14,154 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
14
|
14
|
| EXPLANATION OF VARIABLES
|
15
|
15
|
| -------------------------------------------------------------------
|
16
|
16
|
|
|
17
|
|
-| ['dsn'] The full DSN string describe a connection to the database.
|
18
|
|
-| ['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
|
22
|
|
-| ['dbdriver'] The database driver. e.g.: mysqli.
|
23
|
|
-| Currently supported:
|
24
|
|
-| cubrid, ibase, mssql, mysql, mysqli, oci8,
|
25
|
|
-| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
|
26
|
|
-| ['dbprefix'] You can add an optional prefix, which will be added
|
27
|
|
-| to the table name when using the Query Builder class
|
28
|
|
-| ['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
|
34
|
|
-| NOTE: For MySQL and MySQLi databases, this setting is only used
|
35
|
|
-| 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).
|
37
|
|
-| 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.
|
41
|
|
-| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
|
42
|
|
-| ['encrypt'] Whether or not to use an encrypted connection.
|
|
17
|
+| ['dsn'] The full DSN string describe a connection to the database.
|
|
18
|
+| ['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
|
|
22
|
+| ['dbdriver'] The database driver. e.g.: mysqli.
|
|
23
|
+| Currently supported:
|
|
24
|
+| cubrid, ibase, mssql, mysql, mysqli, oci8,
|
|
25
|
+| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
|
|
26
|
+| ['dbprefix'] You can add an optional prefix, which will be added
|
|
27
|
+| to the table name when using the Query Builder class
|
|
28
|
+| ['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
|
|
34
|
+| NOTE: For MySQL and MySQLi databases, this setting is only used
|
|
35
|
+| 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).
|
|
37
|
+| 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.
|
|
41
|
+| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
|
|
42
|
+| ['encrypt'] Whether or not to use an encrypted connection.
|
43
|
43
|
|
|
44
|
|
-| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
|
45
|
|
-| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
|
44
|
+| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
|
|
45
|
+| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
46
|
46
|
|
|
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 certificates in PEM format
|
51
|
|
-| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
|
52
|
|
-| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not
|
|
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 certificates in PEM format
|
|
51
|
+| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
|
|
52
|
+| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not
|
53
|
53
|
|
|
54
|
|
-| ['compress'] Whether or not to use client compression (MySQL only)
|
55
|
|
-| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|
56
|
|
-| - good for ensuring strict SQL while developing
|
57
|
|
-| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
|
58
|
|
-| ['failover'] array - A array with 0 or more data for connections if the main should fail.
|
59
|
|
-| ['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.
|
|
54
|
+| ['compress'] Whether or not to use client compression (MySQL only)
|
|
55
|
+| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|
|
56
|
+| - good for ensuring strict SQL while developing
|
|
57
|
+| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
|
|
58
|
+| ['failover'] array - A array with 0 or more data for connections if the main should fail.
|
|
59
|
+| ['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.
|
66
|
66
|
|
|
67
|
67
|
| The $active_group variable lets you choose which connection group to
|
68
|
68
|
| make active. By default there is only one group (the 'default' group).
|
69
|
69
|
|
|
70
|
70
|
| The $query_builder variables lets you determine whether or not to load
|
71
|
71
|
| the query builder class.
|
72
|
|
-*/
|
|
72
|
+ */
|
73
|
73
|
$active_group = 'default';
|
74
|
|
-$query_builder = TRUE;
|
|
74
|
+$query_builder = true;
|
75
|
75
|
|
76
|
76
|
$db['default'] = array(
|
77
|
|
- 'dsn' => '',
|
78
|
|
- 'hostname' => 'localhost',
|
79
|
|
- 'username' => '',
|
80
|
|
- 'password' => '',
|
81
|
|
- 'database' => '',
|
82
|
|
- 'dbdriver' => 'mysqli',
|
83
|
|
- 'dbprefix' => '',
|
84
|
|
- 'pconnect' => FALSE,
|
85
|
|
- 'db_debug' => (ENVIRONMENT !== 'production'),
|
86
|
|
- 'cache_on' => FALSE,
|
87
|
|
- 'cachedir' => '',
|
88
|
|
- 'char_set' => 'utf8',
|
89
|
|
- 'dbcollat' => 'utf8_general_ci',
|
90
|
|
- 'swap_pre' => '',
|
91
|
|
- 'encrypt' => FALSE,
|
92
|
|
- 'compress' => FALSE,
|
93
|
|
- 'stricton' => FALSE,
|
94
|
|
- 'failover' => array(),
|
95
|
|
- 'save_queries' => TRUE
|
|
77
|
+ 'dsn' => '',
|
|
78
|
+ 'hostname' => 'office.mindden.com',
|
|
79
|
+ //'hostname' => "localhost",
|
|
80
|
+ 'port' => '33306',
|
|
81
|
+ //'port' => '3306',
|
|
82
|
+ 'username' => 'root',
|
|
83
|
+ 'password' => 'mindden2017',
|
|
84
|
+ //'password' => '',
|
|
85
|
+ 'database' => 'liciagbar',
|
|
86
|
+ 'dbdriver' => 'mysqli',
|
|
87
|
+ 'dbprefix' => '',
|
|
88
|
+ 'pconnect' => false,
|
|
89
|
+ 'db_debug' => (ENVIRONMENT !== 'production'),
|
|
90
|
+ 'cache_on' => false,
|
|
91
|
+ 'cachedir' => '',
|
|
92
|
+ 'char_set' => 'utf8',
|
|
93
|
+ 'dbcollat' => 'utf8_general_ci',
|
|
94
|
+ 'swap_pre' => '',
|
|
95
|
+ 'encrypt' => false,
|
|
96
|
+ 'compress' => false,
|
|
97
|
+ 'stricton' => false,
|
|
98
|
+ 'failover' => array(),
|
|
99
|
+ 'save_queries' => true,
|
96
|
100
|
);
|
|
101
|
+
|
|
102
|
+/*
|
|
103
|
+if (isset($_SERVER["SERVER_NAME"])) {
|
|
104
|
+switch ($_SERVER["SERVER_NAME"]) {
|
|
105
|
+
|
|
106
|
+//DESARROLLO
|
|
107
|
+case "rielchyc":
|
|
108
|
+$db['default'] = array(
|
|
109
|
+'dsn' => '',
|
|
110
|
+'hostname' => '217.125.90.43',
|
|
111
|
+//'hostname' => "localhost",
|
|
112
|
+'port' => '33306',
|
|
113
|
+//'port' => '3306',
|
|
114
|
+'username' => 'root',
|
|
115
|
+'password' => 'mindden2017',
|
|
116
|
+//'password' => '',
|
|
117
|
+'database' => 'rielchyc',
|
|
118
|
+'dbdriver' => 'mysqli',
|
|
119
|
+'dbprefix' => '',
|
|
120
|
+'pconnect' => FALSE,
|
|
121
|
+'db_debug' => (ENVIRONMENT !== 'production'),
|
|
122
|
+'cache_on' => FALSE,
|
|
123
|
+'cachedir' => '',
|
|
124
|
+'char_set' => 'utf8',
|
|
125
|
+'dbcollat' => 'utf8_general_ci',
|
|
126
|
+'swap_pre' => '',
|
|
127
|
+'encrypt' => FALSE,
|
|
128
|
+'compress' => FALSE,
|
|
129
|
+'stricton' => FALSE,
|
|
130
|
+'failover' => array(),
|
|
131
|
+'save_queries' => TRUE
|
|
132
|
+);
|
|
133
|
+break;
|
|
134
|
+
|
|
135
|
+//DESARROLLO STP
|
|
136
|
+case "mediosdev.stpnettraining.com":
|
|
137
|
+$db['default'] = array(
|
|
138
|
+'dsn' => '',
|
|
139
|
+'hostname' => 'localhost',
|
|
140
|
+'port' => '3306',
|
|
141
|
+'username' => 'root_medios',
|
|
142
|
+'password' => 'uRp60x!9',
|
|
143
|
+'database' => 'admin_mediosdev',
|
|
144
|
+'dbdriver' => 'mysqli',
|
|
145
|
+'dbprefix' => '',
|
|
146
|
+'pconnect' => FALSE,
|
|
147
|
+'db_debug' => (ENVIRONMENT !== 'production'),
|
|
148
|
+'cache_on' => FALSE,
|
|
149
|
+'cachedir' => '',
|
|
150
|
+'char_set' => 'utf8',
|
|
151
|
+'dbcollat' => 'utf8_general_ci',
|
|
152
|
+'swap_pre' => '',
|
|
153
|
+'encrypt' => FALSE,
|
|
154
|
+'compress' => FALSE,
|
|
155
|
+'stricton' => FALSE,
|
|
156
|
+'failover' => array(),
|
|
157
|
+'save_queries' => TRUE
|
|
158
|
+);
|
|
159
|
+break;
|
|
160
|
+
|
|
161
|
+}
|
|
162
|
+}
|
|
163
|
+else {
|
|
164
|
+
|
|
165
|
+//CRONS
|
|
166
|
+$db['default']['database'] = 'rielchyc';
|
|
167
|
+}*/
|