[Tickets #2766] NEW: Wrong parameters passed to memcache_set
bugs@bugs.horde.org
bugs at bugs.horde.org
Wed Oct 12 17:59:00 PDT 2005
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=2766
-----------------------------------------------------------------------
Ticket | 2766
Created By | kevin_myer at iu13.org
Summary | Wrong parameters passed to memcache_set
Queue | Horde Framework Packages
Version | HEAD
State | Unconfirmed
Priority | 1. Low
Type | Bug
Owners |
-----------------------------------------------------------------------
kevin_myer at iu13.org (2005-10-12 17:58) wrote:
Working through getting an understanding of the memcache sessionhandler
tonight, I think the memcache_set call is missing a parameter. $lifetime is
setting the value for compression, not for the lifetime of the session,
since the prototype for memcache_set is:
Memcache::set ( string key, mixed var [, int flag [, int expire]] )
It probably doesn't hurt anything, except the anticipated lifetime is
ignored (I don't know what the default for expire would be).
Index: memcached.php
===================================================================
RCS file:
/repository/framework/SessionHandler/SessionHandler/memcached.php,v
retrieving revision 1.8
diff -u -r1.8 memcached.php
--- memcached.php 1 Jun 2005 02:10:01 -0000 1.8
+++ memcached.php 13 Oct 2005 00:51:32 -0000
@@ -86,7 +86,7 @@
$this->_connect();
$lifetime = ini_get('session.gc_maxlifetime');
- $result = @memcache_set($this->_db, $id, $session_data,
$lifetime);
+ $result = @memcache_set($this->_db, $id, $session_data,
MEMCACHE_COMPRESSED, $lifetime);
if (!$result) {
Horde::logMessage('Error writing session data (id = ' . $id .
')', __FILE__, __LINE__, PEAR_LOG_ERR);
More information about the bugs
mailing list