[Tickets #6673] horde not switching db correctly using horde sql session storage and mysql authentication with persistent connections

bugs at horde.org bugs at horde.org
Fri May 2 08:37:20 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/6673
-----------------------------------------------------------------------
 Ticket             | 6673
 Created By         | robb at wtg.cw.com
 Summary            | horde not switching db correctly using horde sql
session storage and
                    | mysql authentication with persistent connections
 Queue              | Horde Base
 Version            | 3.1.7
 Type               | Bug
 State              | Unconfirmed
 Priority           | 1. Low
 Milestone          |
 Patch              |
 Owners             |
-----------------------------------------------------------------------


robb at wtg.cw.com (2008-05-02 04:37) wrote:

auth config is as follows:

$conf['auth']['params']['persistent'] = false;
$conf['auth']['params']['username'] = 'horde';
$conf['auth']['params']['password'] = '*****';
$conf['auth']['params']['hostspec'] = 'mysql';
$conf['auth']['params']['port'] = 3306;
$conf['auth']['params']['protocol'] = 'tcp';
$conf['auth']['params']['database'] = 'postfix';
$conf['auth']['params']['charset'] = 'iso-8859-1';
$conf['auth']['params']['phptype'] = 'mysql';
$conf['auth']['params']['driverconfig'] = 'custom';
$conf['auth']['params']['table'] = 'mailbox';
$conf['auth']['params']['username_field'] = 'username';
$conf['auth']['params']['password_field'] = 'password';
$conf['auth']['params']['encryption'] = 'crypt-md5';
$conf['auth']['params']['show_encryption'] = false;
$conf['auth']['driver'] = 'sql';

session config:

$conf['sessionhandler']['params']['persistent'] = true;
$conf['sessionhandler']['params']['rowlocking'] = true;
$conf['sessionhandler']['params']['port'] = 3306;
$conf['sessionhandler']['params']['protocol'] = 'tcp';
$conf['sessionhandler']['params']['hostspec'] = 'mysql';
$conf['sessionhandler']['params']['username'] = 'horde';
$conf['sessionhandler']['params']['password'] = '*****';
$conf['sessionhandler']['params']['database'] = 'horde';
$conf['sessionhandler']['type'] = 'mysql';

mysql query log shows:

080501 17:18:12     186 Connect     horde at example.org on
                    186 Init DB     horde
                    186 Query       START TRANSACTION
                    186 Query       SELECT session_data FROM
horde_sessionhandler WHERE session_id = '***************' AND
session_lastmodified > 1209657252 FOR UPDATE
                    186 Init DB     postfix
                    186 Init DB     postfix
                    186 Query       SELECT name FROM mailbox WHERE
username=''
                    186 Init DB     postfix
                    186 Init DB     postfix
                    186 Query       SELECT name FROM mailbox WHERE
username=''
                    186 Query       DELETE FROM horde_sessionhandler WHERE
session_id = '***************'
                    186 Query       ROLLBACK
                    186 Init DB     postfix
                    186 Init DB     postfix
                    186 Query       SELECT name FROM mailbox WHERE
username=''
                    186 Init DB     postfix
                    186 Init DB     postfix
                    186 Query       SELECT name FROM mailbox WHERE
username=''
                    186 Query       REPLACE INTO horde_sessionhandler
(session_id, session_data

login fails with following logged by horde:

horde[22401]: [horde] Error writing session data: INSERT,DELETE command
denied to user 'horde'@'example.org' for table 'horde_sessionhandler' [on
line 147 of "/usr/share/horde/lib/Horde/SessionHandler/mysql.php"]

changing to non-persistent db connections fixes the issue




More information about the bugs mailing list