Index: includes/bootstrap.inc =================================================================== --- includes/bootstrap.inc (revision 6584) +++ includes/bootstrap.inc (working copy) @@ -236,7 +236,17 @@ function conf_init() { global $db_url, $db_prefix, $base_url, $base_path, $base_root, $conf, $installed_profile; $conf = array(); include_once './'. conf_path() .'/settings.php'; + // Don't call conf_base_url(), if it is called in settings.php. + if (!isset($base_root) || !isset($base_path)) { + conf_base_url(); + } +} +/** + * Sets the base URL correctly. + */ +function conf_base_url() { + global $base_url, $base_path, $base_root; if (isset($base_url)) { // Parse fixed base URL from settings.php. $parts = parse_url($base_url); Index: sites/default/settings.php =================================================================== --- sites/default/settings.php (revision 6584) +++ sites/default/settings.php (working copy) @@ -150,6 +150,14 @@ if (isset($_SERVER['HTTP_HOST'])) { } /** + * To prevent cookie collisions, use an unique session name. Session names only + * accept alphanumeric characters. If you want to share sessions across + * installations in the same domain, specify the session name by hand. + */ +conf_base_url(); +session_name(preg_replace('`(^https?://|[^a-z\d])`i', '', $base_url)); + +/** * Variable overrides: * * To override specific entries in the 'variable' table for this site,