From: moodler Date: Thu, 16 Oct 2003 13:19:10 +0000 (+0000) Subject: A new Moodle variable called sessioncookie is now added to the session X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c1f53195321fde05f7245ff45bce05922343b489;p=moodle.git A new Moodle variable called sessioncookie is now added to the session cookie name. This provides a means for multiple Moodles within the same website to keep separate sessions and not get confused. --- diff --git a/admin/config.html b/admin/config.html index 162151a7b9..4eff2652e7 100644 --- a/admin/config.html +++ b/admin/config.html @@ -194,6 +194,15 @@ + +

sessioncookie: + + + + + + +

zip: diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 71002d6dbe..f9ab072fcd 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -129,6 +129,7 @@ $string['configmaxbytes'] = "This specifies a maximum size that uploaded files c $string['configmaxeditingtime'] = "This specifies the amount of time people have to re-edit forum postings, journal feedback etc. Usually 30 minutes is a good value."; $string['configproxyhost'] = "If this server needs to use a proxy computer (eg a firewall) to access the Internet, then provide the proxy hostname and port here. Otherwise leave it blank."; $string['configsecureforms'] = "Moodle can use an additional level of security when accepting data from web forms. If this is enabled, then the browser's HTTP_REFERER variable is checked against the current form address. In a very few cases this can cause problems if the user is using a firewall (eg Zonealarm) configured to strip HTTP_REFERER from their web traffic. Symptoms are getting 'stuck' on a form. If your users are having problems with the login page (for example) you might want to disable this setting, although it might leave your site more open to brute-force password attacks. If in doubt, leave this set to 'Yes'."; +$string['configsessioncookie'] = "This setting customises the name of the cookie used for Moodle sessions. This is optional, and only useful to avoid cookies being confused when there is more than one copy of Moodle running within the same web site."; $string['configsessiontimeout'] = "If people logged in to this site are idle for a long time (without loading pages) then they are automatically logged out (their session is ended). This variable specifies how long this time should be."; $string['configslasharguments'] = "Files (images, uploads etc) are provided via a script using 'slash arguments' (the second option here). This method allows files to be more easily cached in web browsers, proxy servers etc. Unfortunately, some PHP servers don't allow this method, so if you have trouble viewing uploaded files or images (eg user pictures), set this variable to the first option"; $string['configsmtphosts'] = "Give the full name of one or more local SMTP servers that Moodle should use to send mail (eg 'mail.a.com' or 'mail.a.com;mail.b.com'). If you leave it blank, Moodle will use the PHP default method of sending mail."; diff --git a/lib/defaults.php b/lib/defaults.php index 3a892a9027..c17a49b685 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -26,6 +26,7 @@ "proxyhost" => "", "proxyport" => "", "secureforms" => false, + "sessioncookie" => "", "sessiontimeout" => 7200, "slasharguments" => 1, "smtphosts" => "", diff --git a/lib/setup.php b/lib/setup.php index 35106df9c7..1422136504 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -171,7 +171,7 @@ class object {}; if (!isset($nomoodlecookie)) { - session_name('MoodleSession'); + session_name('MoodleSession'.$CFG->sessioncookie); @session_start(); if (! isset($_SESSION['SESSION'])) { $_SESSION['SESSION'] = new object;