Révision 65ce03da
Ajouté par Julien Enselme il y a plus de 10 ans
template/d7-settings.php | ||
---|---|---|
52 | 52 |
* @see conf_path() |
53 | 53 |
*/ |
54 | 54 |
|
55 |
/** |
|
56 |
* Database settings: |
|
57 |
* |
|
58 |
* The $databases array specifies the database connection or |
|
59 |
* connections that Drupal may use. Drupal is able to connect |
|
60 |
* to multiple databases, including multiple types of databases, |
|
61 |
* during the same request. |
|
62 |
* |
|
63 |
* Each database connection is specified as an array of settings, |
|
64 |
* similar to the following: |
|
65 |
* @code |
|
66 |
* array( |
|
67 |
* 'driver' => 'mysql', |
|
68 |
* 'database' => 'databasename', |
|
69 |
* 'username' => 'username', |
|
70 |
* 'password' => 'password', |
|
71 |
* 'host' => 'localhost', |
|
72 |
* 'port' => 3306, |
|
73 |
* 'prefix' => 'myprefix_', |
|
74 |
* 'collation' => 'utf8_general_ci', |
|
75 |
* ); |
|
76 |
* @endcode |
|
77 |
* |
|
78 |
* The "driver" property indicates what Drupal database driver the |
|
79 |
* connection should use. This is usually the same as the name of the |
|
80 |
* database type, such as mysql or sqlite, but not always. The other |
|
81 |
* properties will vary depending on the driver. For SQLite, you must |
|
82 |
* specify a database file name in a directory that is writable by the |
|
83 |
* webserver. For most other drivers, you must specify a |
|
84 |
* username, password, host, and database name. |
|
85 |
* |
|
86 |
* Some database engines support transactions. In order to enable |
|
87 |
* transaction support for a given database, set the 'transactions' key |
|
88 |
* to TRUE. To disable it, set it to FALSE. Note that the default value |
|
89 |
* varies by driver. For MySQL, the default is FALSE since MyISAM tables |
|
90 |
* do not support transactions. |
|
91 |
* |
|
92 |
* For each database, you may optionally specify multiple "target" databases. |
|
93 |
* A target database allows Drupal to try to send certain queries to a |
|
94 |
* different database if it can but fall back to the default connection if not. |
|
95 |
* That is useful for master/slave replication, as Drupal may try to connect |
|
96 |
* to a slave server when appropriate and if one is not available will simply |
|
97 |
* fall back to the single master server. |
|
98 |
* |
|
99 |
* The general format for the $databases array is as follows: |
|
100 |
* @code |
|
101 |
* $databases['default']['default'] = $info_array; |
|
102 |
* $databases['default']['slave'][] = $info_array; |
|
103 |
* $databases['default']['slave'][] = $info_array; |
|
104 |
* $databases['extra']['default'] = $info_array; |
|
105 |
* @endcode |
|
106 |
* |
|
107 |
* In the above example, $info_array is an array of settings described above. |
|
108 |
* The first line sets a "default" database that has one master database |
|
109 |
* (the second level default). The second and third lines create an array |
|
110 |
* of potential slave databases. Drupal will select one at random for a given |
|
111 |
* request as needed. The fourth line creates a new database with a name of |
|
112 |
* "extra". |
|
113 |
* |
|
114 |
* For a single database configuration, the following is sufficient: |
|
115 |
* @code |
|
116 |
* $databases['default']['default'] = array( |
|
117 |
* 'driver' => 'mysql', |
|
118 |
* 'database' => 'databasename', |
|
119 |
* 'username' => 'username', |
|
120 |
* 'password' => 'password', |
|
121 |
* 'host' => 'localhost', |
|
122 |
* 'prefix' => 'main_', |
|
123 |
* 'collation' => 'utf8_general_ci', |
|
124 |
* ); |
|
125 |
* @endcode |
|
126 |
* |
|
127 |
* You can optionally set prefixes for some or all database table names |
|
128 |
* by using the 'prefix' setting. If a prefix is specified, the table |
|
129 |
* name will be prepended with its value. Be sure to use valid database |
|
130 |
* characters only, usually alphanumeric and underscore. If no prefixes |
|
131 |
* are desired, leave it as an empty string ''. |
|
132 |
* |
|
133 |
* To have all database names prefixed, set 'prefix' as a string: |
|
134 |
* @code |
|
135 |
* 'prefix' => 'main_', |
|
136 |
* @endcode |
|
137 |
* To provide prefixes for specific tables, set 'prefix' as an array. |
|
138 |
* The array's keys are the table names and the values are the prefixes. |
|
139 |
* The 'default' element is mandatory and holds the prefix for any tables |
|
140 |
* not specified elsewhere in the array. Example: |
|
141 |
* @code |
|
142 |
* 'prefix' => array( |
|
143 |
* 'default' => 'main_', |
|
144 |
* 'users' => 'shared_', |
|
145 |
* 'sessions' => 'shared_', |
|
146 |
* 'role' => 'shared_', |
|
147 |
* 'authmap' => 'shared_', |
|
148 |
* ), |
|
149 |
* @endcode |
|
150 |
* You can also use a reference to a schema/database as a prefix. This may be |
|
151 |
* useful if your Drupal installation exists in a schema that is not the default |
|
152 |
* or you want to access several databases from the same code base at the same |
|
153 |
* time. |
|
154 |
* Example: |
|
155 |
* @code |
|
156 |
* 'prefix' => array( |
|
157 |
* 'default' => 'main.', |
|
158 |
* 'users' => 'shared.', |
|
159 |
* 'sessions' => 'shared.', |
|
160 |
* 'role' => 'shared.', |
|
161 |
* 'authmap' => 'shared.', |
|
162 |
* ); |
|
163 |
* @endcode |
|
164 |
* NOTE: MySQL and SQLite's definition of a schema is a database. |
|
165 |
* |
|
166 |
* Advanced users can add or override initial commands to execute when |
|
167 |
* connecting to the database server, as well as PDO connection settings. For |
|
168 |
* example, to enable MySQL SELECT queries to exceed the max_join_size system |
|
169 |
* variable, and to reduce the database connection timeout to 5 seconds: |
|
170 |
* |
|
171 |
* @code |
|
172 |
* $databases['default']['default'] = array( |
|
173 |
* 'init_commands' => array( |
|
174 |
* 'big_selects' => 'SET SQL_BIG_SELECTS=1', |
|
175 |
* ), |
|
176 |
* 'pdo' => array( |
|
177 |
* PDO::ATTR_TIMEOUT => 5, |
|
178 |
* ), |
|
179 |
* ); |
|
180 |
* @endcode |
|
181 |
* |
|
182 |
* WARNING: These defaults are designed for database portability. Changing them |
|
183 |
* may cause unexpected behavior, including potential data loss. |
|
184 |
* |
|
185 |
* @see DatabaseConnection_mysql::__construct |
|
186 |
* @see DatabaseConnection_pgsql::__construct |
|
187 |
* @see DatabaseConnection_sqlite::__construct |
|
188 |
* |
|
189 |
* Database configuration format: |
|
190 |
* @code |
|
191 |
* $databases['default']['default'] = array( |
|
192 |
* 'driver' => 'mysql', |
|
193 |
* 'database' => 'databasename', |
|
194 |
* 'username' => 'username', |
|
195 |
* 'password' => 'password', |
|
196 |
* 'host' => 'localhost', |
|
197 |
* 'prefix' => '', |
|
198 |
* ); |
|
199 |
* $databases['default']['default'] = array( |
|
200 |
* 'driver' => 'pgsql', |
|
201 |
* 'database' => 'databasename', |
|
202 |
* 'username' => 'username', |
|
203 |
* 'password' => 'password', |
|
204 |
* 'host' => 'localhost', |
|
205 |
* 'prefix' => '', |
|
206 |
* ); |
|
207 |
* $databases['default']['default'] = array( |
|
208 |
* 'driver' => 'sqlite', |
|
209 |
* 'database' => '/path/to/databasefilename', |
|
210 |
* ); |
|
211 |
* @endcode |
|
212 |
*/ |
|
213 |
|
|
55 | 214 |
/** |
56 | 215 |
* Access control for update.php script. |
57 | 216 |
* |
... | ... | |
84 | 243 |
*/ |
85 | 244 |
$drupal_hash_salt = ''; |
86 | 245 |
|
87 |
|
|
246 |
/** |
|
247 |
* Base URL (optional). |
|
248 |
* |
|
249 |
* If Drupal is generating incorrect URLs on your site, which could |
|
250 |
* be in HTML headers (links to CSS and JS files) or visible links on pages |
|
251 |
* (such as in menus), uncomment the Base URL statement below (remove the |
|
252 |
* leading hash sign) and fill in the absolute URL to your Drupal installation. |
|
253 |
* |
|
254 |
* You might also want to force users to use a given domain. |
|
255 |
* See the .htaccess file for more information. |
|
256 |
* |
|
257 |
* Examples: |
|
258 |
* $base_url = 'http://www.example.com'; |
|
259 |
* $base_url = 'http://www.example.com:8888'; |
|
260 |
* $base_url = 'http://www.example.com/drupal'; |
|
261 |
* $base_url = 'https://www.example.com:8888/drupal'; |
|
262 |
* |
|
263 |
* It is not allowed to have a trailing slash; Drupal will add it |
|
264 |
* for you. |
|
265 |
*/ |
|
88 | 266 |
|
89 | 267 |
/** |
90 | 268 |
* PHP settings: |
... | ... | |
372 | 550 |
*/ |
373 | 551 |
$conf['allow_authorize_operations'] = FALSE; |
374 | 552 |
|
553 |
// Load the local settings files with databases connexion. |
|
375 | 554 |
require dirname(__FILE__) . '/settings.local.php'; |
Formats disponibles : Unified diff
Settings.php et scripts assosciés
Correction de commentaires.