[horde] pgsql_sessionhandler.sql not working?

imp imp at xtremedev.com
Tue Jul 8 00:43:14 PDT 2003


Hello,

  I'm currently running horde and imp from HEAD (cvs'd as of five hours
  ago) successfully with postgresql 7.3.3 and cyrus-imapd2. With one
  minor exception, I can't get session handling to work through sql --
  It only works with file based handling.

  Starting up psql and connecting to the horde database, I see:

horde=# \d horde_sessionhandler 
           Table "public.horde_sessionhandler"
        Column        |         Type          | Modifiers 
----------------------+-----------------------+-----------
 session_id           | character varying(32) | not null
 session_lastmodified | integer               | not null
 session_data         | text                  | 
Indexes: horde_sessionhandler_pkey primary key btree (session_id)

  (This was after running \i horde/scripts/db/pgsq_sessionhandler.sql)
  I also have the following line in horde/config/conf.php:

$conf['sessionhandler']['type'] = 'sql';

  But when I try to login via imp, I am immediately logged out with an
  error message saying my session has expired. Doing a select * from
  horde_sessionhandler; returns one line, one very long line.

  However, if I set the above line to the default file-based handler, I
  can login just fine:

$conf['sessionhandler']['type'] = 'none';

  I am at a loss as to how to debug this, or figure out why the sql
  entry is being created but not used (or why it's telling imp that the
  session has expired.)

  I know the horde database works because everything else is using sql
  as the handler: vfs, tokens, cache, category, prefs, etc. I am able to
  successfully save my preferences, for example.

  What are some things I can try to debug this? I see this in horde.log
  when I try to login using the sql sessionhandler:

Jul 08 01:36:52 HORDE [debug] [imp] SQL Query by SessionHandler_sql::destroy(): query = "DELETE FROM horde_sessionhandler WHERE session_id = '60ebeee4135eb75857951728840d5b8f'" [on line 142 of "/usr/local/www/data/horde/lib/SessionHandler/sql.php"]
Jul 08 01:36:52 HORDE [notice] [imp] Login success for testuser at XtremeDev.com [192.168.1.2] to {mail.XtremeDev.com:993} [on line 108 of "/usr/local/www/data/horde/imp/redirect.php"]
Jul 08 01:36:54 HORDE [info] [imp] Session timeout for client [192.168.1.2] [on line 83 of "/usr/local/www/data/horde/imp/login.php"]
Jul 08 01:36:54 HORDE [debug] [horde] SQL Query by SessionHandler_sql::write(): query = "SELECT session_id FROM horde_sessionhandler WHERE session_id = '63ada1f71f18ce3dce624d8470d7a7b4'" [on line 103 of "/usr/local/www/data/horde/lib/SessionHandler/sql.php"]
Jul 08 01:36:54 HORDE [debug] [horde] SQL Query by Horde_SQL::updateBlob(): query = "UPDATE horde_sessionhandler SET session_lastmodified = ?, session_data = ? WHERE session_id = ?" [on line 201 of "/usr/local/www/data/horde/lib/SQL.php"]

  And on imp, I see: "Your Mail session has expired. Please login
  again."

  In psql, select session_id from horde_sessionhandler where session_id
  = '63ada1f71f18ce3dce624d8470d7a7b4' returns with it, showing that it
  does exist in the database table.

  Ideas? Anyone else running horde/imp HEAD with Postgresql for
  sessionhandler?



More information about the horde mailing list