]> git.mjollnir.org Git - moodle.git/commitdiff
I think this might solve the mysterious problems with
authormoodler <moodler>
Thu, 15 Apr 2004 14:46:54 +0000 (14:46 +0000)
committermoodler <moodler>
Thu, 15 Apr 2004 14:46:54 +0000 (14:46 +0000)
session garbage collection and timeouts not working.

Note: upgrading to this will KILL all current sessions, so
you will need to log back in.

admin/index.php
lib/setup.php

index cd9f97eb42f9e49eb91c98384b257c9e1697bddd..2d6e13ce21d47b0a7362371224246a3edfe3716b 100644 (file)
         die;
     }
 
+
 /// Check some PHP server settings
 
     $documentationlink = "please read the <A HREF=\"../doc/?frame=install.html&sub=webserver\">install documentation</A>";
 
-
     if (ini_get_bool('session.auto_start')) {
         error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
     }
     }
 
 
-
-/// Check that sessions are supported
-
-    if (!is_readable(ini_get('session.save_path')) and !ini_get_bool('safe_mode')) {
-        $sessionpath = ini_get('session.save_path');
-        notify("Warning: It appears your server does not support sessions (session.save_path = '$sessionpath')");
-    }
-
-
 /// Check that config.php has been edited
 
     if ($CFG->wwwroot == "http://example.com/moodle") {
index c49af81b42fabcba3347559abaf7d5dbb9a33128..774bc52d77825262db71d0f20861a98cf3d06862 100644 (file)
         ini_set('session.gc_maxlifetime', $CFG->sessiontimeout);
     }
 
+/// Set custom session path
+    if (!file_exists("$CFG->dataroot/sessions")) {
+        make_upload_directory('sessions');
+    }
+    ini_set('session.save_path', "$CFG->dataroot/sessions");
+
 /// Set sessioncookie variable if it isn't already
     if (!isset($CFG->sessioncookie)) {
         $CFG->sessioncookie = '';