[imp] PG as session backend

Arshavir Grigorian ag at m-cam.com
Wed Jan 19 13:06:42 PST 2005


Arshavir Grigorian wrote:

> Arshavir Grigorian wrote:
>
>> Hi,
>>
>> I just installed the latest Horde3/IMP.
>> The problem is that when I configure Horde to use my pg database for 
>> session handling and use IMP/IMAP for authentication, I can no longer 
>> login. Even though /tmp/horde.log says that my login was successful, 
>> I am still redirected to the login page.
>> If I change the session handling to use the file based option, 
>> everything works fine.
>> Could someone, please, tell me if there is a known problem with 
>> handling sessions through a PG database. Thanks!
>>
>>
>>
>>
>> Arshavir
>
>
> I still can't figure out why using Pg for a session handler does not 
> work.
> Here is the relevant section of my horde/config/conf.php file:
>
> $conf['sessionhandler']['params']['persistent'] = true;
> $conf['sessionhandler']['params']['port'] = 5432;
> $conf['sessionhandler']['params']['protocol'] = 'tcp';
> $conf['sessionhandler']['params']['hostspec'] = 'localhost';
> $conf['sessionhandler']['params']['username'] = 'horde';
> $conf['sessionhandler']['params']['password'] = 'xxxxx';
> $conf['sessionhandler']['params']['database'] = 'horde';
> $conf['sessionhandler']['params']['table'] = 'horde_sessionhandler';
> $conf['sessionhandler']['type'] = 'pgsql';
>
> What's interesting is that after I attempt to log in and get 
> redirected back to the login page, there is a record in 
> horde_sessionhandler in addition to a successful login message in 
> /tmp/horde.log.
>
> Any ideas?
>
>
>
> Arshavir
>
I just enabled debugging and got the following entries in my log file 
for a single login. (the output is after uniq -c cause many of the 
entries appear several times).
I am not quite sure what Datatree does but had to enable it to get 
around a bug which was not being fixed till the next release.
What's interesting is that the query against the horde_datatree table is 
repeated 23 + 5 + times while there are no records with (group_uid = 
'horde.perms'), only 10 record with (group_uid = 'horde.hitory').

Hope this is helpful.


Arshavir


      1 Jan 19 15:52:03 HORDE [debug] [horde] SQL Query by 
SessionHandler_pgsql::read(): query = "BEGIN; SELECT session_data FROM 
horde_sessionhandler WHERE session_id = 
'e74d2c40bf96272f586d8d84baf5f747' AND session_lastmodified >= 
1106166483 FOR UPDATE;" [on line 108 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/SessionHandler/pgsql.php"]
      1 Jan 19 15:52:04 HORDE [debug] [imp] SQL Query by 
Prefs_sql::retrieve(): SELECT pref_scope, pref_name, pref_value FROM 
horde_prefs WHERE pref_uid = 'm-cam/grigoriana/ag' AND (pref_scope = 
'imp' OR pref_scope = 'horde') ORDER BY pref_scope [on line 147 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/Prefs/sql.php"]
      1 Jan 19 15:52:04 HORDE [debug] [imp] SQL Query by 
Prefs_sql::retrieve(): SELECT pref_scope, pref_name, pref_value FROM 
horde_prefs WHERE pref_uid = 'm-cam/grigoriana/ag' AND (pref_scope = 
'ingo' OR pref_scope = 'horde') ORDER BY pref_scope [on line 147 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/Prefs/sql.php"]
      1 Jan 19 15:52:04 HORDE [notice] [imp] Login success for 
m-cam/username/alias [192.168.1.21] to {localhost:143} [on line 150 of 
"/usr/local/apache2/htdocs/horde/imp/redirect.php"]
      1 Jan 19 15:52:06 HORDE [debug] [horde] SQL Query by 
SessionHandler_pgsql::read(): query = "BEGIN; SELECT session_data FROM 
horde_sessionhandler WHERE session_id = 
'47a94a47a4ff914754aa2543d04150ab' AND session_lastmodified >= 
1106166486 FOR UPDATE;" [on line 108 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/SessionHandler/pgsql.php"]
      2 Jan 19 15:52:07 HORDE [debug] [horde] SQL Query by 
SessionHandler_pgsql::read(): query = "BEGIN; SELECT session_data FROM 
horde_sessionhandler WHERE session_id = 
'47a94a47a4ff914754aa2543d04150ab' AND session_lastmodified >= 
1106166487 FOR UPDATE;" [on line 108 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/SessionHandler/pgsql.php"]
      5 Jan 19 15:52:08 HORDE [debug] [horde] SQL Query by 
DataTree_sql::_load(): SELECT datatree_id, datatree_name, 
datatree_parents, datatree_order FROM horde_datatree WHERE group_uid = 
'horde.perms' [on line 106 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/DataTree/sql.php"]
      1 Jan 19 15:52:09 HORDE [debug] [horde] SQL Query by 
DataTree_sql::_load(): SELECT datatree_id, datatree_name, 
datatree_parents, datatree_order FROM horde_datatree WHERE group_uid = 
'horde.perms' [on line 106 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/DataTree/sql.php"]
      1 Jan 19 15:52:09 HORDE [debug] [horde] SQL Query by 
SessionHandler_pgsql::read(): query = "BEGIN; SELECT session_data FROM 
horde_sessionhandler WHERE session_id = 
'47a94a47a4ff914754aa2543d04150ab' AND session_lastmodified >= 
1106166489 FOR UPDATE;" [on line 108 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/SessionHandler/pgsql.php"]
      1 Jan 19 15:52:09 HORDE [debug] [] SQL Query by 
DataTree_sql::_load(): SELECT datatree_id, datatree_name, 
datatree_parents, datatree_order FROM horde_datatree WHERE group_uid = 
'horde.perms' [on line 106 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/DataTree/sql.php"]
      1 Jan 19 15:52:09 HORDE [debug] [horde] SQL Query by 
SessionHandler_pgsql::read(): query = "BEGIN; SELECT session_data FROM 
horde_sessionhandler WHERE session_id = 
'47a94a47a4ff914754aa2543d04150ab' AND session_lastmodified >= 
1106166489 FOR UPDATE;" [on line 108 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/SessionHandler/pgsql.php"]
      4 Jan 19 15:52:09 HORDE [debug] [] SQL Query by 
DataTree_sql::_load(): SELECT datatree_id, datatree_name, 
datatree_parents, datatree_order FROM horde_datatree WHERE group_uid = 
'horde.perms' [on line 106 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/DataTree/sql.php"]
     23 Jan 19 15:52:10 HORDE [debug] [] SQL Query by 
DataTree_sql::_load(): SELECT datatree_id, datatree_name, 
datatree_parents, datatree_order FROM horde_datatree WHERE group_uid = 
'horde.perms' [on line 106 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/DataTree/sql.php"]
      1 Jan 19 15:52:11 HORDE [debug] [horde] SQL Query by 
SessionHandler_pgsql::read(): query = "BEGIN; SELECT session_data FROM 
horde_sessionhandler WHERE session_id = 
'47a94a47a4ff914754aa2543d04150ab' AND session_lastmodified >= 
1106166491 FOR UPDATE;" [on line 108 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/SessionHandler/pgsql.php"]
      1 Jan 19 15:52:12 HORDE [info] [imp] 192.168.1.21  [on line 31 of 
"/usr/local/apache2/htdocs/horde/imp/login.php"]
      1 Jan 19 15:52:12 HORDE [debug] [imp] SQL Query by 
DataTree_sql::_load(): SELECT datatree_id, datatree_name, 
datatree_parents, datatree_order FROM horde_datatree WHERE group_uid = 
'horde.perms' [on line 106 of 
"/usr/local/apache2/htdocs/horde/lib/Horde/DataTree/sql.php"]




More information about the imp mailing list