[horde] mysql session handler

Kevin Conley kevinconley at northwestern.edu
Fri Feb 23 13:07:32 PST 2007


I am using RHEL with:
apache 2.0.55
mySQL 5.0.18
PHP 5.1.2
HORDE 3.1.3
IMP 4.1.3
TURBA 2.1.3

I have it working great with default PHP session handler. However whenever i try 
to switch to the mySQL based sessionhandler i get an error. I am already using 
mySQL as the pref handler and they are on the same maching using socket based 
connection.

Any ideas on why this is happening?

Here is the error:

Feb 23 14:58:07 HORDE [error] [imp] Error writing session data [on line 144 of 
"/var/www/html/horde/lib/Horde/SessionHandler/mysql.php"]

This seems to be the code throwing the error:

         $query = sprintf('REPLACE INTO %s (session_id, session_data, 
session_lastmodified)' .
                          ' VALUES (%s, %s, %s)',
                          $this->_params['table'],
                          $this->_quote($id),
                          $this->_quote($session_data),
                          time());

         $result = @mysql_query($query, $this->_db);
         if (empty($this->_params['rowlocking'])) {
             @mysql_query('UNLOCK TABLES ' . $this->_params['table'], $this->_db);
         }
         if (!$result) {
             @mysql_query('ROLLBACK', $this->_db);
             Horde::logMessage('Error writing session data', __FILE__, __LINE__, 
PEAR_LOG_ERR);
             return false;
         }

-- 
Kevin Conley	
Technology Support Services
Northwestern University
847-491-4086


More information about the horde mailing list