summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-27 08:11:09 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-27 08:11:09 -0700
commit871f598dcc81d7018f25590d767591722bb977f2 (patch)
treee8a9ffa43b9c20c2fbcbe044a31bcd5b75b01308
parentfb84c35035e33eebea79f207f73ba2deea86c4d7 (diff)
debug flag for sessions
-rw-r--r--README2
-rw-r--r--classes/Session.php4
-rw-r--r--lib/common.php3
3 files changed, 7 insertions, 2 deletions
diff --git a/README b/README
index 7f8748b3f..c8c529ed8 100644
--- 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.
+debug: whether to output debugging info for session storage. Can help
+ with weird session bugs, sometimes. Default false.
Troubleshooting
===============
diff --git a/classes/Session.php b/classes/Session.php
index 5c48e4aa9..93fd99baa 100644
--- a/classes/Session.php
+++ b/classes/Session.php
@@ -42,7 +42,9 @@ class Session extends Memcached_DataObject
static function logdeb($msg)
{
- common_debug("Session: " . $msg);
+ if (common_config('sessions', 'debug')) {
+ common_debug("Session: " . $msg);
+ }
}
static function open($save_path, $session_name)
diff --git a/lib/common.php b/lib/common.php
index 3a5913f85..e2936f075 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -255,7 +255,8 @@ $config =
'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');