| 1 |
<?php
|
| 2 |
// $Id: settings.php,v 1.39 2007/01/14 02:05:15 unconed 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 |
$db_url = '%%db_url%%';
|
| 94 |
$db_prefix = '';
|
| 95 |
|
| 96 |
/**
|
| 97 |
* Base URL (optional).
|
| 98 |
*
|
| 99 |
* If you are experiencing issues with different site domains,
|
| 100 |
* uncomment the Base URL statement below (remove the leading hash sign)
|
| 101 |
* and fill in the URL to your Drupal installation.
|
| 102 |
*
|
| 103 |
* You might also want to force users to use a given domain.
|
| 104 |
* See the .htaccess file for more information.
|
| 105 |
*
|
| 106 |
* Examples:
|
| 107 |
* $base_url = 'http://www.example.com';
|
| 108 |
* $base_url = 'http://www.example.com:8888';
|
| 109 |
* $base_url = 'http://www.example.com/drupal';
|
| 110 |
* $base_url = 'https://www.example.com:8888/drupal';
|
| 111 |
*
|
| 112 |
* It is not allowed to have a trailing slash; Drupal will add it
|
| 113 |
* for you.
|
| 114 |
*/
|
| 115 |
$base_url = '%%base_url%%'; // NO trailing slash!
|
| 116 |
|
| 117 |
/**
|
| 118 |
* PHP settings:
|
| 119 |
*
|
| 120 |
* To see what PHP settings are possible, including whether they can
|
| 121 |
* be set at runtime (ie., when ini_set() occurs), read the PHP
|
| 122 |
* documentation at http://www.php.net/manual/en/ini.php#ini.list
|
| 123 |
* and take a look at the .htaccess file to see which non-runtime
|
| 124 |
* settings are used there. Settings defined here should not be
|
| 125 |
* duplicated there so as to avoid conflict issues.
|
| 126 |
*/
|
| 127 |
ini_set('arg_separator.output', '&');
|
| 128 |
ini_set('magic_quotes_runtime', 0);
|
| 129 |
ini_set('magic_quotes_sybase', 0);
|
| 130 |
ini_set('session.cache_expire', 200000);
|
| 131 |
ini_set('session.cache_limiter', 'none');
|
| 132 |
ini_set('session.cookie_lifetime', 2000000);
|
| 133 |
ini_set('session.gc_maxlifetime', 200000);
|
| 134 |
ini_set('session.save_handler', 'user');
|
| 135 |
ini_set('session.use_only_cookies', 1);
|
| 136 |
ini_set('session.use_trans_sid', 0);
|
| 137 |
ini_set('url_rewriter.tags', '');
|
| 138 |
|
| 139 |
/**
|
| 140 |
* We try to set the correct cookie domain. If you are experiencing problems
|
| 141 |
* try commenting out the code below or specifying the cookie domain by hand.
|
| 142 |
*/
|
| 143 |
if (isset($_SERVER['HTTP_HOST'])) {
|
| 144 |
$domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
|
| 145 |
// Per RFC 2109, cookie domains must contain at least one dot other than the
|
| 146 |
// first. For hosts such as 'localhost', we don't set a cookie domain.
|
| 147 |
if (count(explode('.', $domain)) > 2) {
|
| 148 |
ini_set('session.cookie_domain', $domain);
|
| 149 |
}
|
| 150 |
}
|
| 151 |
|
| 152 |
/**
|
| 153 |
* Variable overrides:
|
| 154 |
*
|
| 155 |
* To override specific entries in the 'variable' table for this site,
|
| 156 |
* set them here. You usually don't need to use this feature. This is
|
| 157 |
* useful in a configuration file for a vhost or directory, rather than
|
| 158 |
* the default settings.php. Any configuration setting from the 'variable'
|
| 159 |
* table can be given a new value.
|
| 160 |
*
|
| 161 |
* Remove the leading hash signs to enable.
|
| 162 |
*/
|
| 163 |
$conf = array(
|
| 164 |
'file_directory_path' => '%%files_dir%%',
|
| 165 |
);
|
| 166 |
|