[horde] session handler and DB issue

Antoine Heskia horde at heskia.net
Fri Apr 22 12:13:05 UTC 2011


Hi,

In my previous H3/IMP4 the session handler was wet with MySQL backend and I did not encountered any problem at all.

I have now an H4/IMP5 setup (pear installation) and the DB access seems not to work at all when I set session handler to use SQL backend:
- when session handler is set with PHP default (file based): the different tables are updated correctly (horde_prefs for instance)
- when session handler is set with SQL, then only horde_cache and horde_sessionhandler seem to be updated correctly but any INSERT in other horde table is not working anymore.

here's an extract of my horde config file
 [...]
 $conf['sql']['username'] = 'horde';
 $conf['sql']['password'] = '*******';
 $conf['sql']['socket'] = '/var/run/mysqld/mysqld.sock';
 $conf['sql']['protocol'] = 'unix';
 $conf['sql']['database'] = 'horde';
 $conf['sql']['charset'] = 'utf-8';
 $conf['sql']['splitread'] = false;
 $conf['sql']['ssl'] = false;
 $conf['sql']['phptype'] = 'mysqli'; 
 [...]
 $conf['sessionhandler']['params']['driverconfig'] = 'horde';
 $conf['sessionhandler']['type'] = 'Sql';
 $conf['sessionhandler']['memcache'] = false;
 [...]

If I look into the log I can clearly see INSERT statements in horde_prefs, but the table is not updated !

2011-04-22T11:32:08+02:00 DEBUG: HORDE [imp] Horde_Prefs: Storing preference value (last_logintasks) [pid 6605 on line 193 of "/usr/share/php/Horde/Prefs.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [imp] SQL  (0,0002s)
       SELECT 1 FROM horde_prefs WHERE pref_uid = 'user at domain.com' AND
         pref_name = 'upgrade_tasks' AND pref_scope = 'horde' [pid 6605 on line 783 of "/usr/share/php/Horde/Db/Adapter/Base.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [imp] SQL  (0,0002s)
       INSERT INTO horde_prefs (pref_uid, pref_scope, pref_name, pref_value)
         VALUES('user at domain.com', 'horde', 'upgrade_tasks',
         'a:2:{s:3:"imp";s:5:"5.0.1";s:8:"imp_auth";s:5:"5.0.1";}') [pid 6605 on line 783 of "/usr/share/php/Horde/Db/Adapter/Base.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [imp] SQL  (0,0001s)
       SELECT 1 FROM horde_prefs WHERE pref_uid = 'user at domain.com' AND
         pref_name = 'last_logintasks' AND pref_scope = 'horde' [pid 6605 on line 783 of "/usr/share/php/Horde/Db/Adapter/Base.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [imp] SQL  (0,0001s)
       INSERT INTO horde_prefs (pref_uid, pref_scope, pref_name, pref_value)
         VALUES('user at domain.com', 'horde', 'last_logintasks',
         'a:2:{s:3:"imp";i:1303464728;s:5:"horde";i:1303464728;}') [pid 6605 on line 783 of "/usr/share/php/Horde/Db/Adapter/Base.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [imp] Max memory usage: 14942208 bytes [pid 6605 on line 464 of "/usr/share/php/Horde/Registry.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [horde] SQL  (0,0002s)
       SHOW CHARACTER SET [pid 6605 on line 783 of "/usr/share/php/Horde/Db/Adapter/Base.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [horde] SQL  (0,0000s)
       SET NAMES 'utf8' [pid 6605 on line 783 of "/usr/share/php/Horde/Db/Adapter/Base.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [horde] SQL  (0,0002s)
       SELECT session_id FROM horde_sessionhandler WHERE session_id =
         'o1217h2ugn11qroimttbrba0d1' [pid 6605 on line 783 of "/usr/share/php/Horde/Db/Adapter/Base.php"]
2011-04-22T11:32:08+02:00 DEBUG: HORDE [horde] SQL  (0,0056s)
       REPLACE INTO horde_sessionhandler (session_id, session_data,
         session_lastmodified) VALUES ('o1217h2ugn11qroimttbrba0d1',
        [...]

I thought it was a memory issue because of max memory usage, but I have been told that Max memory usage statement is not an error...

Do you have any solution ?

Thanks,
Antoine.


More information about the horde mailing list