Project

General

Profile

Revision 65ce03da

Added by Julien Enselme over 10 years ago

Settings.php et scripts assosciƩs

Correction de commentaires.

View differences:

bin/d7-all-update-settings.sh
7 7

  
8 8
for settings in $(find $d7_dir_sites -mindepth 2 -maxdepth 2 -name settings.php) ; do
9 9

  
10
    # We go into the settings.php directory
10
    # We go into the settings.php directory.
11 11
    settings_dir=`give_dir $settings`
12 12
    cd $settings_dir
13 13

  
bin/scripts-config.sh
42 42

  
43 43
### Template
44 44
d7_settings_name="d7-settings.php"
45
d7_settings_local_template_name="d7-settins-local-template.php"
45
d7_settings_local_template_name="d7-settings-local-template.php"
46 46
d7_settings="$dir_template/$d7_settings_name"
47 47
d7_settings_local_template="$dir_template/$d7_settings_local_name"
48 48

  
bin/scripts-utils.sh
72 72

  
73 73
give_dir(){
74 74
    # ARG: file
75
    # Return the abosulte directory path of a file or a dir
75
    # Return the abosulte directory path of a file or a dir.
76 76
    settings_location=`realpath $1`
77 77
    echo `dirname $settings_location`
78 78
}
scripts_divers/d7-all-gen-settings-local.sh
18 18

  
19 19
    rm $settings
20 20

  
21
    # We go into the settings.php directory
21
    # We go into the settings.php directory.
22 22
    cd $settings_dir
23 23

  
24 24
    cp $d7_settings settings.php
template/d7-settings-local-template.php
1 1
<?php
2 2

  
3
/**
4
 * Database settings:
5
 *
6
 * The $databases array specifies the database connection or
7
 * connections that Drupal may use.  Drupal is able to connect
8
 * to multiple databases, including multiple types of databases,
9
 * during the same request.
10
 *
11
 * Each database connection is specified as an array of settings,
12
 * similar to the following:
13
 * @code
14
 * array(
15
 *   'driver' => 'mysql',
16
 *   'database' => 'databasename',
17
 *   'username' => 'username',
18
 *   'password' => 'password',
19
 *   'host' => 'localhost',
20
 *   'port' => 3306,
21
 *   'prefix' => 'myprefix_',
22
 *   'collation' => 'utf8_general_ci',
23
 * );
24
 * @endcode
25
 *
26
 * The "driver" property indicates what Drupal database driver the
27
 * connection should use.  This is usually the same as the name of the
28
 * database type, such as mysql or sqlite, but not always.  The other
29
 * properties will vary depending on the driver.  For SQLite, you must
30
 * specify a database file name in a directory that is writable by the
31
 * webserver.  For most other drivers, you must specify a
32
 * username, password, host, and database name.
33
 *
34
 * Some database engines support transactions.  In order to enable
35
 * transaction support for a given database, set the 'transactions' key
36
 * to TRUE.  To disable it, set it to FALSE.  Note that the default value
37
 * varies by driver.  For MySQL, the default is FALSE since MyISAM tables
38
 * do not support transactions.
39
 *
40
 * For each database, you may optionally specify multiple "target" databases.
41
 * A target database allows Drupal to try to send certain queries to a
42
 * different database if it can but fall back to the default connection if not.
43
 * That is useful for master/slave replication, as Drupal may try to connect
44
 * to a slave server when appropriate and if one is not available will simply
45
 * fall back to the single master server.
46
 *
47
 * The general format for the $databases array is as follows:
48
 * @code
49
 * $databases['default']['default'] = $info_array;
50
 * $databases['default']['slave'][] = $info_array;
51
 * $databases['default']['slave'][] = $info_array;
52
 * $databases['extra']['default'] = $info_array;
53
 * @endcode
54
 *
55
 * In the above example, $info_array is an array of settings described above.
56
 * The first line sets a "default" database that has one master database
57
 * (the second level default).  The second and third lines create an array
58
 * of potential slave databases.  Drupal will select one at random for a given
59
 * request as needed.  The fourth line creates a new database with a name of
60
 * "extra".
61
 *
62
 * For a single database configuration, the following is sufficient:
63
 * @code
64
 * $databases['default']['default'] = array(
65
 *   'driver' => 'mysql',
66
 *   'database' => 'databasename',
67
 *   'username' => 'username',
68
 *   'password' => 'password',
69
 *   'host' => 'localhost',
70
 *   'prefix' => 'main_',
71
 *   'collation' => 'utf8_general_ci',
72
 * );
73
 * @endcode
74
 *
75
 * You can optionally set prefixes for some or all database table names
76
 * by using the 'prefix' setting. If a prefix is specified, the table
77
 * name will be prepended with its value. Be sure to use valid database
78
 * characters only, usually alphanumeric and underscore. If no prefixes
79
 * are desired, leave it as an empty string ''.
80
 *
81
 * To have all database names prefixed, set 'prefix' as a string:
82
 * @code
83
 *   'prefix' => 'main_',
84
 * @endcode
85
 * To provide prefixes for specific tables, set 'prefix' as an array.
86
 * The array's keys are the table names and the values are the prefixes.
87
 * The 'default' element is mandatory and holds the prefix for any tables
88
 * not specified elsewhere in the array. Example:
89
 * @code
90
 *   'prefix' => array(
91
 *     'default'   => 'main_',
92
 *     'users'     => 'shared_',
93
 *     'sessions'  => 'shared_',
94
 *     'role'      => 'shared_',
95
 *     'authmap'   => 'shared_',
96
 *   ),
97
 * @endcode
98
 * You can also use a reference to a schema/database as a prefix. This may be
99
 * useful if your Drupal installation exists in a schema that is not the default
100
 * or you want to access several databases from the same code base at the same
101
 * time.
102
 * Example:
103
 * @code
104
 *   'prefix' => array(
105
 *     'default'   => 'main.',
106
 *     'users'     => 'shared.',
107
 *     'sessions'  => 'shared.',
108
 *     'role'      => 'shared.',
109
 *     'authmap'   => 'shared.',
110
 *   );
111
 * @endcode
112
 * NOTE: MySQL and SQLite's definition of a schema is a database.
113
 *
114
 * Advanced users can add or override initial commands to execute when
115
 * connecting to the database server, as well as PDO connection settings. For
116
 * example, to enable MySQL SELECT queries to exceed the max_join_size system
117
 * variable, and to reduce the database connection timeout to 5 seconds:
118
 *
119
 * @code
120
 * $databases['default']['default'] = array(
121
 *   'init_commands' => array(
122
 *     'big_selects' => 'SET SQL_BIG_SELECTS=1',
123
 *   ),
124
 *   'pdo' => array(
125
 *     PDO::ATTR_TIMEOUT => 5,
126
 *   ),
127
 * );
128
 * @endcode
129
 *
130
 * WARNING: These defaults are designed for database portability. Changing them
131
 * may cause unexpected behavior, including potential data loss.
132
 *
133
 * @see DatabaseConnection_mysql::__construct
134
 * @see DatabaseConnection_pgsql::__construct
135
 * @see DatabaseConnection_sqlite::__construct
136
 *
137
 * Database configuration format:
138
 * @code
139
 *   $databases['default']['default'] = array(
140
 *     'driver' => 'mysql',
141
 *     'database' => 'databasename',
142
 *     'username' => 'username',
143
 *     'password' => 'password',
144
 *     'host' => 'localhost',
145
 *     'prefix' => '',
146
 *   );
147
 *   $databases['default']['default'] = array(
148
 *     'driver' => 'pgsql',
149
 *     'database' => 'databasename',
150
 *     'username' => 'username',
151
 *     'password' => 'password',
152
 *     'host' => 'localhost',
153
 *     'prefix' => '',
154
 *   );
155
 *   $databases['default']['default'] = array(
156
 *     'driver' => 'sqlite',
157
 *     'database' => '/path/to/databasefilename',
158
 *   );
159
 * @endcode
160
 */
161 3
$databases = array (
162 4
  'default' =>
163 5
  array (
......
174 16
  ),
175 17
);
176 18

  
177
/**
178
 * Base URL (optional).
179
 *
180
 * If Drupal is generating incorrect URLs on your site, which could
181
 * be in HTML headers (links to CSS and JS files) or visible links on pages
182
 * (such as in menus), uncomment the Base URL statement below (remove the
183
 * leading hash sign) and fill in the absolute URL to your Drupal installation.
184
 *
185
 * You might also want to force users to use a given domain.
186
 * See the .htaccess file for more information.
187
 *
188
 * Examples:
189
 *   $base_url = 'http://www.example.com';
190
 *   $base_url = 'http://www.example.com:8888';
191
 *   $base_url = 'http://www.example.com/drupal';
192
 *   $base_url = 'https://www.example.com:8888/drupal';
193
 *
194
 * It is not allowed to have a trailing slash; Drupal will add it
195
 * for you.
196
 */
197 19
$base_url = 'http://assos.centrale-marseille.fr/%%SITE_NAME%%';
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';

Also available in: Unified diff