]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
debug flag for sessions
authorEvan Prodromou <evan@controlyourself.ca>
Sat, 27 Jun 2009 15:11:09 +0000 (08:11 -0700)
committerEvan Prodromou <evan@controlyourself.ca>
Sat, 27 Jun 2009 15:11:09 +0000 (08:11 -0700)
README
classes/Session.php
lib/common.php

diff --git a/README b/README
index 7f8748b3fdea6fe1126b0908509851bdd77c034a..c8c529ed86d2b22cc72cec4a503fa565c69f93a1 100644 (file)
--- a/README
+++ b/README
@@ -1287,6 +1287,8 @@ handle: boolean. Whether we should register our own PHP session-handling
        code (using the database and memcache if enabled). Defaults to false.
        Setting this to true makes some sense on large or multi-server
        sites, but it probably won't hurt for smaller ones, either.
        code (using the database and memcache if enabled). Defaults to false.
        Setting this to true makes some sense on large or multi-server
        sites, but it probably won't hurt for smaller ones, either.
+debug: whether to output debugging info for session storage. Can help
+       with weird session bugs, sometimes. Default false.
 
 Troubleshooting
 ===============
 
 Troubleshooting
 ===============
index 5c48e4aa90bae9f80bf0eafb0998b44f05439c6f..93fd99baa817ee2a6ddd75c7e16b95094917f746 100644 (file)
@@ -42,7 +42,9 @@ class Session extends Memcached_DataObject
 
     static function logdeb($msg)
     {
 
     static function logdeb($msg)
     {
-        common_debug("Session: " . $msg);
+        if (common_config('sessions', 'debug')) {
+            common_debug("Session: " . $msg);
+        }
     }
 
     static function open($save_path, $session_name)
     }
 
     static function open($save_path, $session_name)
index 3a5913f85caeda27549dce2529f7fecc8f06bf29..e2936f0751d245a1179b5028d9b2ef25c84c56f8 100644 (file)
@@ -255,7 +255,8 @@ $config =
         'search' =>
         array('type' => 'fulltext'),
         'sessions' =>
         'search' =>
         array('type' => 'fulltext'),
         'sessions' =>
-        array('handle' => false), // whether to handle sessions ourselves
+        array('handle' => false, // whether to handle sessions ourselves
+              'debug' => false), // debugging output for sessions
         );
 
 $config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');
         );
 
 $config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');