BOINC /
boinc
| 1 | <?php |
||
| 2 | // $Id: settings.php,v 1.39.2.3 2007/07/09 04:28:12 drumm Exp $ |
||
| 3 | |||
| 4 | /** |
||
| 5 | * @file |
||
| 6 | * Drupal site-specific configuration file. |
||
| 7 | * |
||
| 8 | * IMPORTANT NOTE: |
||
| 9 | * This file may have been set to read-only by the Drupal installation |
||
| 10 | * program. If you make changes to this file, be sure to protect it again |
||
| 11 | * after making your modifications. Failure to remove write permissions |
||
| 12 | * to this file is a security risk. |
||
| 13 | * |
||
| 14 | * The configuration file to be loaded is based upon the rules below. |
||
| 15 | * |
||
| 16 | * The configuration directory will be discovered by stripping the |
||
| 17 | * website's hostname from left to right and pathname from right to |
||
| 18 | * left. The first configuration file found will be used and any |
||
| 19 | * others will be ignored. If no other configuration file is found |
||
| 20 | * then the default configuration file at 'sites/default' will be used. |
||
| 21 | * |
||
| 22 | * For example, for a fictitious site installed at |
||
| 23 | * http://www.drupal.org/mysite/test/, the 'settings.php' |
||
| 24 | * is searched in the following directories: |
||
| 25 | * |
||
| 26 | * 1. sites/www.drupal.org.mysite.test |
||
| 27 | * 2. sites/drupal.org.mysite.test |
||
| 28 | * 3. sites/org.mysite.test |
||
| 29 | * |
||
| 30 | * 4. sites/www.drupal.org.mysite |
||
| 31 | * 5. sites/drupal.org.mysite |
||
| 32 | * 6. sites/org.mysite |
||
| 33 | * |
||
| 34 | * 7. sites/www.drupal.org |
||
| 35 | * 8. sites/drupal.org |
||
| 36 | * 9. sites/org |
||
| 37 | * |
||
| 38 | * 10. sites/default |
||
| 39 | * |
||
| 40 | * If you are installing on a non-standard port number, prefix the |
||
| 41 | * hostname with that number. For example, |
||
| 42 | * http://www.drupal.org:8080/mysite/test/ could be loaded from |
||
| 43 | * sites/8080.www.drupal.org.mysite.test/. |
||
| 44 | */ |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Database settings: |
||
| 48 | * |
||
| 49 | * Note that the $db_url variable gets parsed using PHP's built-in |
||
| 50 | * URL parser (i.e. using the "parse_url()" function) so make sure |
||
| 51 | * not to confuse the parser. If your username, password |
||
| 52 | * or database name contain characters used to delineate |
||
| 53 | * $db_url parts, you can escape them via URI hex encodings: |
||
| 54 | * |
||
| 55 | * : = %3a / = %2f @ = %40 |
||
| 56 | * + = %2b ( = %28 ) = %29 |
||
| 57 | * ? = %3f = = %3d & = %26 |
||
| 58 | * |
||
| 59 | * To specify multiple connections to be used in your site (i.e. for |
||
| 60 | * complex custom modules) you can also specify an associative array |
||
| 61 | * of $db_url variables with the 'default' element used until otherwise |
||
| 62 | * requested. |
||
| 63 | * |
||
| 64 | * You can optionally set prefixes for some or all database table names |
||
| 65 | * by using the $db_prefix setting. If a prefix is specified, the table |
||
| 66 | * name will be prepended with its value. Be sure to use valid database |
||
| 67 | * characters only, usually alphanumeric and underscore. If no prefixes |
||
| 68 | * are desired, leave it as an empty string ''. |
||
| 69 | * |
||
| 70 | * To have all database names prefixed, set $db_prefix as a string: |
||
| 71 | * |
||
| 72 | * $db_prefix = 'main_'; |
||
| 73 | * |
||
| 74 | * To provide prefixes for specific tables, set $db_prefix as an array. |
||
| 75 | * The array's keys are the table names and the values are the prefixes. |
||
| 76 | * The 'default' element holds the prefix for any tables not specified |
||
| 77 | * elsewhere in the array. Example: |
||
| 78 | * |
||
| 79 | * $db_prefix = array( |
||
| 80 | * 'default' => 'main_', |
||
| 81 | * 'users' => 'shared_', |
||
| 82 | * 'sessions' => 'shared_', |
||
| 83 | * 'role' => 'shared_', |
||
| 84 | * 'authmap' => 'shared_', |
||
| 85 | * 'sequences' => 'shared_', |
||
| 86 | * ); |
||
| 87 | * |
||
| 88 | * Database URL format: |
||
| 89 | * $db_url = 'mysql://username:password@localhost/databasename'; |
||
| 90 | * $db_url = 'mysqli://username:password@localhost/databasename'; |
||
| 91 | * $db_url = 'pgsql://username:password@localhost/databasename'; |
||
| 92 | */ |
||
| 93 | |||
| 94 | /** |
||
| 95 | * BOINC database configuration |
||
| 96 | * |
||
| 97 | * Place in file dbconfig.php the variables used below to set the |
||
| 98 | * databases. The drupal database is the 'default' |
||
| 99 | * database. 'boinc_rw' is the BOINC project database. If you have a |
||
| 100 | * replica (read-only) BOINC project database, you may define it as |
||
| 101 | * 'boinc_ro'. (N.B., if there is no 'boinc_ro' database defined, |
||
| 102 | * the Drupal-BOINC code will use 'boinc_rw' for all BOINC database |
||
| 103 | * queries. |
||
| 104 | * |
||
| 105 | * Drupal database variables |
||
| 106 | * - dbtype : type such as mysql or mysqli (when in doubt, use mysqli) |
||
| 107 | * - dbuser : name of database user |
||
| 108 | * - dbpass : password of database user |
||
| 109 | * - dbserver : database server remote IP, or 'localhost' |
||
| 110 | * - dbname : name of database, often 'drupal' |
||
| 111 | * |
||
| 112 | * For the BOINC project databases, the variables are the same but |
||
| 113 | * have prefix 'boinc_rw' and 'boinc_ro'. |
||
| 114 | */ |
||
| 115 | require_once('dbconfig.php'); |
||
| 116 | if (!isset($dbserver) || empty($dbserver)) |
||
| 117 | $dbserver='localhost'; |
||
| 118 | $db_url = array( |
||
| 119 | 'default' => "{$dbtype}://{$dbuser}:".urlencode($dbpass)."@{$dbserver}/{$dbname}", |
||
| 120 | 'boinc_rw' => "{$boinc_rw_dbtype}://{$boinc_rw_dbuser}:".urlencode($boinc_rw_dbpass)."@{$boinc_rw_dbserver}/{$boinc_rw_dbname}" |
||
| 121 | ); |
||
| 122 | $db_prefix = ''; |
||
| 123 | |||
| 124 | // Set boinc_ro if variables are present, otherwise duplicate |
||
| 125 | // 'boinc_rw' entry as 'boinc_ro'. |
||
| 126 | |||
| 127 | if (isset($boinc_ro_dbtype) && isset($boinc_ro_dbuser) && isset($boinc_ro_dbpass) && isset($boinc_ro_dbserver) && isset($boinc_ro_dbname)) { |
||
| 128 | $db_url['boinc_ro'] = "{$boinc_ro_dbtype}://{$boinc_ro_dbuser}:".urlencode($boinc_ro_dbpass)."@{$boinc_ro_dbserver}/{$boinc_ro_dbname}"; |
||
| 129 | } |
||
| 130 | else { |
||
| 131 | $db_url['boinc_ro'] = $db_url['boinc_rw']; |
||
| 132 | } |
||
| 133 | |||
| 134 | /** |
||
| 135 | * Base URL (optional). |
||
| 136 | * |
||
| 137 | * If you are experiencing issues with different site domains, |
||
| 138 | * uncomment the Base URL statement below (remove the leading hash sign) |
||
| 139 | * and fill in the URL to your Drupal installation. |
||
| 140 | * |
||
| 141 | * You might also want to force users to use a given domain. |
||
| 142 | * See the .htaccess file for more information. |
||
| 143 | * |
||
| 144 | * Examples: |
||
| 145 | * $base_url = 'http://www.example.com'; |
||
| 146 | * $base_url = 'http://www.example.com:8888'; |
||
| 147 | * $base_url = 'http://www.example.com/drupal'; |
||
| 148 | * $base_url = 'https://www.example.com:8888/drupal'; |
||
| 149 | * |
||
| 150 | * It is not allowed to have a trailing slash; Drupal will add it |
||
| 151 | * for you. |
||
| 152 | */ |
||
| 153 | # $base_url = 'http://www.example.com'; // NO trailing slash! |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 154 | |||
| 155 | /** |
||
| 156 | * PHP settings: |
||
| 157 | * |
||
| 158 | * To see what PHP settings are possible, including whether they can |
||
| 159 | * be set at runtime (ie., when ini_set() occurs), read the PHP |
||
| 160 | * documentation at http://www.php.net/manual/en/ini.php#ini.list |
||
| 161 | * and take a look at the .htaccess file to see which non-runtime |
||
| 162 | * settings are used there. Settings defined here should not be |
||
| 163 | * duplicated there so as to avoid conflict issues. |
||
| 164 | */ |
||
| 165 | ini_set('session.cache_expire', 200000); |
||
| 166 | ini_set('session.cache_limiter', 'none'); |
||
| 167 | ini_set('session.cookie_lifetime', 2000000); |
||
| 168 | ini_set('session.gc_maxlifetime', 200000); |
||
| 169 | ini_set('session.save_handler', 'user'); |
||
| 170 | ini_set('session.use_only_cookies', 1); |
||
| 171 | ini_set('session.use_trans_sid', 0); |
||
| 172 | ini_set('url_rewriter.tags', ''); |
||
| 173 | ini_set('memory_limit', '128M'); |
||
| 174 | ini_set('post_max_size', '8MB'); |
||
| 175 | ini_set('upload_max_filesize', '8MB'); |
||
| 176 | |||
| 177 | /** |
||
| 178 | * Drupal automatically generates a unique session cookie name for each site |
||
| 179 | * based on on its full domain name. If you have multiple domains pointing at |
||
| 180 | * the same Drupal site, you can either redirect them all to a single domain |
||
| 181 | * (see comment in .htaccess), or uncomment the line below and specify their |
||
| 182 | * shared base domain. Doing so assures that users remain logged in as they |
||
| 183 | * cross between your various domains. |
||
| 184 | */ |
||
| 185 | # $cookie_domain = 'example.com'; |
||
|
0 ignored issues
–
show
|
|||
| 186 | |||
| 187 | /** |
||
| 188 | * Variable overrides: |
||
| 189 | * |
||
| 190 | * To override specific entries in the 'variable' table for this site, |
||
| 191 | * set them here. You usually don't need to use this feature. This is |
||
| 192 | * useful in a configuration file for a vhost or directory, rather than |
||
| 193 | * the default settings.php. Any configuration setting from the 'variable' |
||
| 194 | * table can be given a new value. |
||
| 195 | * |
||
| 196 | * Remove the leading hash signs to enable. |
||
| 197 | */ |
||
| 198 | # $conf = array( |
||
|
0 ignored issues
–
show
|
|||
| 199 | # 'site_name' => 'My Drupal site', |
||
|
0 ignored issues
–
show
|
|||
| 200 | # 'theme_default' => 'minnelli', |
||
|
0 ignored issues
–
show
|
|||
| 201 | # 'anonymous' => 'Visitor', |
||
|
0 ignored issues
–
show
|
|||
| 202 | # ); |
||
|
0 ignored issues
–
show
|
|||
| 203 | |||
| 204 | /** |
||
| 205 | * Load local development override configuration, if available. |
||
| 206 | * |
||
| 207 | * Use settings.local.php to override variables on secondary (staging, |
||
| 208 | * development, etc) installations of this site. Typically used to disable |
||
| 209 | * caching, JavaScript/CSS compression, re-routing of outgoing emails, and |
||
| 210 | * other things that should not happen on development and testing sites. |
||
| 211 | * |
||
| 212 | * Keep this code block at the end of this file to take full effect. |
||
| 213 | */ |
||
| 214 | |||
| 215 | if (stream_resolve_include_path('settings.local.php')) { |
||
| 216 | include 'settings.local.php'; |
||
| 217 | } |
||
| 218 |