[imp] Re: Could not connect to database for SQL SessionHandler
RYAN vAN GINNEKEN
luck at computerking.ca
Sun Mar 13 23:03:23 PST 2005
You Folks are amazing thanks a billion times I have been floundering
with horde now for a couple of weeks off to get to this point. In the
last couple of hours with you help i have made more progress than i
could have on my own in 2 more week. Is it ok if i ask some more
questions?? here goes I no this is kinda of topic of the original post
should i start a new thread?
I am using imap authentication right now but would like to switch to
mysql however i am very new to mysql and have no idea what i am doing
with it. I have run the create_mysql.sql script so there should be a
user named horde with the very (very very) temporary password of
22vu22. However when i switch my authentication to mysql i cannot login
any more not even with user horde. I was hoping to login as horde as
administrator and add all my users and groups to the database from
hordes nice GUI is this possible?
sometimes i get this seems like auth is stuck on imp how do i fix every
time i change to mysql i cannot log back in.
Mar 13 23:58:02 HORDE [error] [imp] FAILED LOGIN 192.168.0.1 to
localhost:143[imap/notls] as horde [on line 247 of
"/usr/local/www/horde/imp/lib/Auth/imp.php"]
Mar 13 23:58:03 HORDE [info] [imp] 192.168.0.1 failed [on line 31 of
"/usr/local/www/horde/imp/login.php"]
sometimes i get this makes more sense just want to login to horde for
now and get things working then try setting imp up next
Mar 13 23:48:48 HORDE [error] [horde] FAILED LOGIN for horde
[192.168.0.1] to Horde [on line 95 of "/usr/local/www/horde/login.php"]
Myke Place wrote:
>If you're using SQL-based prefs, you want:
>
>$conf['prefs']['driver'] = 'sql';
>
>After doing that, you should start to see entries being made in the
>horde_prefs table in your DB and things like 'Last login time:' should
>function correctly.
>
>-mp
>
>* RYAN vAN GINNEKEN (luck at computerking.ca) [050313 23:09] spake thusly:
>
>
>>Myke Place wrote:
>>
>>
>>
>>>If you're really intending to use MySQL-based sessions (which you
>>>probably don't want), you need to create the table horde_sessionhandler.
>>>
>>>
>>>From what I understand, SQL sessions are quite slow. It's more likely
>>
>>
>>>that what you really want are PHP file-based sessions which are both
>>>faster and easier to setup.
>>>
>>>
>>>
>>>
>>Ok sounds like you are right MySQL sessions are not what. However i had
>>trouble before with horde not
>>remembering my setting each time i logged out and then back in. That is
>>why i thought i may need MySQL sessions.
>>
>>Anyway i have replace my conf.php with the conf.php.dist so i can get
>>back into horde and turn off the MySQL
>>session stuff.
>>
>>Ok now i am able to login again Seems every time i do so get the same i
>>still get the "Last login: Never" message and my setting do not get
>>saved. Even though the appear to be saved why?
>>
>>my conf.php looks like this
>>
>><?php
>>/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
>>// $Horde: horde/config/conf.xml,v 1.74.2.3 2005/02/03 16:57:42 jan Exp $
>>$conf['debug_level'] = E_ALL;
>>$conf['max_exec_time'] = 0;
>>$conf['use_ssl'] = 2;
>>$conf['server']['name'] = $_SERVER['SERVER_NAME'];
>>$conf['server']['port'] = $_SERVER['SERVER_PORT'];
>>$conf['compress_pages'] = true;
>>$conf['umask'] = 077;
>>$conf['session']['name'] = 'Horde';
>>$conf['session']['cache_limiter'] = 'nocache';
>>$conf['session']['timeout'] = 0;
>>$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
>>$conf['cookie']['path'] = '/horde';
>>$conf['sql']['phptype'] = 'mysql';
>>$conf['sql']['persistent'] = false;
>>$conf['sql']['protocol'] = 'unix';
>>$conf['sql']['hostspec'] = 'localhost';
>>$conf['sql']['username'] = 'horde';
>>$conf['sql']['password'] = '22vu22';
>>$conf['sql']['database'] = 'horde';
>>$conf['sql']['charset'] = 'iso-8859-1';
>>$conf['auth']['admins'] = array('rmvg', 'luck');
>>$conf['auth']['checkip'] = true;
>>$conf['auth']['params']['app'] = 'imp';
>>$conf['auth']['driver'] = 'application';
>>$conf['signup']['allow'] = false;
>>$conf['signup']['approve'] = true;
>>$conf['signup']['preprocess'] = false;
>>$conf['signup']['queue'] = false;
>>$conf['log']['priority'] = PEAR_LOG_DEBUG;
>>$conf['log']['ident'] = 'HORDE';
>>$conf['log']['params'] = array();
>>$conf['log']['name'] = '/var/log/horde.log';
>>$conf['log']['params']['append'] = true;
>>$conf['log']['type'] = 'file';
>>$conf['log']['enabled'] = true;
>>$conf['log_accesskeys'] = false;
>>$conf['prefs']['driver'] = 'none';
>>$conf['datatree']['params']['driverconfig'] = 'horde';
>>$conf['datatree']['driver'] = 'sql';
>>$conf['group']['driver'] = 'datatree';
>>$conf['cache']['default_lifetime'] = 1800;
>>$conf['cache']['params']['dir'] = Horde::getTempDir();
>>$conf['cache']['driver'] = 'file';
>>$conf['token']['driver'] = 'none';
>>$conf['mailer']['params']['sendmail_path'] = '/usr/sbin/sendmail';
>>$conf['mailer']['params']['sendmail_args'] = '-oi';
>>$conf['mailer']['type'] = 'sendmail';
>>$conf['vfs']['params']['vfsroot'] = '/tmp';
>>$conf['vfs']['type'] = 'file';
>>$conf['sessionhandler']['type'] = 'none';
>>$conf['geoip']['datafile'] = '/usr/local/share/GeoIP/GeoIP.dat';
>>$conf['problems']['email'] = 'webmaster at example.com';
>>$conf['menu']['always'] = false;
>>$conf['menu']['links']['help'] = 'all';
>>$conf['menu']['links']['options'] = 'authenticated';
>>$conf['menu']['links']['problem'] = 'all';
>>$conf['menu']['links']['login'] = 'all';
>>$conf['menu']['links']['logout'] = 'authenticated';
>>$conf['hooks']['username'] = false;
>>$conf['hooks']['preauthenticate'] = false;
>>$conf['hooks']['postauthenticate'] = false;
>>$conf['hooks']['authldap'] = false;
>>$conf['kolab']['enabled'] = false;
>>/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
>>
>>
>>I get tonnes of data tree stuff in my logs now but it is all debug so it
>>should be ok right?
>>
>>
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'horde' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'horde' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'imp' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'imp' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'ingo' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'ingo' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'turba' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'turba' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'nag' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>Mar 13 23:04:28 HORDE [debug] [horde] SQL Query by
>>DataTree_sql::_buildLoadQuery(): SELECT datatree_id, datatree_parents
>>FROM horde_datatree WHERE datatree_name = 'nag' AND group_uid =
>>'horde.perms' ORDER BY datatree_id [on line 173 of
>>"/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>
>>
>>
>>
>>>Also, you may have just posted your SQL password to a few thousand
>>>people, so you might want to change that. ;)
>>>
>>>-mp
>>>
>>>* RYAN vAN GINNEKEN (luck at computerking.ca) [050313 21:40] spake thusly:
>>>
>>>
>>>
>>>
>>>>Ok i have checked my /usr/local/www/horde/config/conf.php (could not
>>>>find the horde.php file you speak of) file for the lines you sent to me
>>>>and they were all there including one exstra that i commented out.about
>>>>protocol. Also i changed the password for the database i am pretty sure
>>>>i changed it to the one below as i followed the instructions on how to
>>>>install mysql script and they recommended that i change it to something
>>>>other than horde. Now i get a different errors (shown below) I think
>>>>this is progress right??
>>>>
>>>>$conf['sessionhandler']['type'] = 'mysql';
>>>>$conf['sessionhandler']['params'] = array();
>>>>$conf['sessionhandler']['params']['phptype'] = 'mysql';
>>>>$conf['sessionhandler']['params']['hostspec'] = 'localhost';
>>>>$conf['sessionhandler']['params']['username'] = 'horde';
>>>>$conf['sessionhandler']['params']['password'] = '22vu22';
>>>>$conf['sessionhandler']['params']['database'] = 'horde';
>>>>$conf['sessionhandler']['params']['table'] = 'horde_sessionhandler';
>>>>$conf['sessionhandler']['params']['persistent'] = false;
>>>>//$conf['sessionhandler']['params']['protocol'] = 'unix';
>>>>
>>>>Mar 13 21:15:49 HORDE [debug] [horde] SQL Query by
>>>>SessionHandler_mysql::read(): query = "SELECT session_data FROM
>>>>horde_sessionhandler WHERE session_id =
>>>>'d12ce4e060e6583e04573ae1ad086b51' AND session_lastmodified >
>>>>1110772309" [on line 107 of
>>>>"/usr/local/www/horde/lib/Horde/SessionHandler/mysql.php"]
>>>>Mar 13 21:15:50 HORDE [error] [horde] Error retrieving session data (id
>>>>= d12ce4e060e6583e04573ae1ad086b51) [on line 112 of
>>>>"/usr/local/www/horde/lib/Horde/SessionHandler/mysql.php"]
>>>>Mar 13 21:15:50 HORDE [emergency] [horde] DB Error: connect failed:
>>>>[nativecode=Table 'horde.horde_sessionhandler' doesn't exist] ** Array
>>>>[on line 1273 of "/usr/local/www/horde/lib/Horde/DataTree/sql.php"]
>>>>Mar 13 21:15:50 HORDE [error] [horde] Error writing session data [on
>>>>line 137 of "/usr/local/www/horde/lib/Horde/SessionHandler/mysql.php"]
>>>>
>>>>
>>>>Josh Trutwin wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>On Sun, 13 Mar 2005 19:44:02 -0700
>>>>>RYAN vAN GINNEKEN <luck at computerking.ca> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>I use freebsd 4.10 and mysql version 4.1 and am having trouble with
>>>>>>the following error
>>>>>>
>>>>>>Mar 13 19:19:53 HORDE [emergency] [horde] Could not connect to
>>>>>>database for SQL SessionHandler. [on line 252 of
>>>>>>"/usr/local/www/horde/lib/Horde/SessionHandler/mysql.php"]
>>>>>>
>>>>>>Can someone help me here is the link to my test.php
>>>>>>
>>>>>>http://canmail.org/horde/test.php
>>>>>>
>>>>>>and my imp
>>>>>>/imp/config/servers.php
>>>>>>$servers['imap'] = array(
>>>>>> 'name' => 'IMAP Server',
>>>>>>// 'server' => 'imap.tokyo.computerking.ca',
>>>>>> 'server' => 'localhost',
>>>>>> 'hordeauth' => false,
>>>>>> 'protocol' => 'imap/notls',
>>>>>> 'port' => 143,
>>>>>> 'folders' => '',
>>>>>> 'namespace' => '',
>>>>>> 'maildomain' => 'computerking.ca',
>>>>>>// 'smtphost' => 'mail1.computerking.ca',
>>>>>> 'smtphost' => 'localhost',
>>>>>> 'smtpport' => 25,\
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>This part of your config is unrelated to the session error above -
>>>>>this is actually telling horde/imp how to connect to your IMAP server.
>>>>>For the session / MySQL part, check config/horde.php for these lines:
>>>>>
>>>>>$conf['sessionhandler']['type'] = 'mysql';
>>>>>
>>>>>AND:
>>>>>
>>>>>$conf['sessionhandler']['params'] = array();
>>>>>$conf['sessionhandler']['params']['phptype'] = 'mysql';
>>>>>$conf['sessionhandler']['params']['hostspec'] = 'localhost';
>>>>>$conf['sessionhandler']['params']['username'] = 'horde';
>>>>>$conf['sessionhandler']['params']['password'] = 'horde';
>>>>>$conf['sessionhandler']['params']['database'] = 'horde';
>>>>>$conf['sessionhandler']['params']['table'] = 'horde_sessionhandler';
>>>>>
>>>>>Josh
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
>>>>Frequently Asked Questions: http://horde.org/faq/
>>>>To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
More information about the imp
mailing list