HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Mail Server Setup With Exim, MySQL, Cyrus-Imapd, Horde Webmail On Centos 5.1 - issue (http://www.howtoforge.com/forums/showthread.php?t=24804)

c0mrade 6th July 2008 00:07

Mail Server Setup With Exim, MySQL, Cyrus-Imapd, Horde Webmail On Centos 5.1 - issue
 
Hi all,

This howto is really great by the way.. and I think I did everything properly .. I double checked the tutorial .. and done everything twice and I get the same result.. so maybe someone can tell me what did I do wrong?
Quote:

A fatal error has occurred
Could not connect to database for SQL SessionHandler.
Details have been logged for the administrator.
I get this message when I try to run the horde mail for the first time .. you can see it yourself here I used google to look up some possible solutions .. came up with this link but still it didn't help. I'm stuck and really don't know what to do next .. here is my horde.log file
Code:

Jul 04 19:16:05 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 04 19:16:07 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 04 19:16:43 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 04 19:19:01 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 04 19:20:59 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 04 19:24:07 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 04 19:24:23 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 04 19:25:04 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 05 12:59:32 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 05 15:03:24 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 05 15:04:50 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]
Jul 05 15:06:48 HORDE [emergency] [horde] Could not connect to database for SQL SessionHandler. [on line 319 of "/usr/share/horde/lib/Horde/S
essionHandler/mysql.php"]

here is content of line 319 of /usr/share/horde/lib//Horde/S
essionHandler/mysql.php
Code:

if (!$this->_db = @$connect($this->_params['hostspec'],
                                    $this->_params['username'],
                                    $this->_params['password'])) {
            Horde::fatal(PEAR::raiseError('Could not connect to database for SQL SessionHandler.'), __FILE__, __LINE__);
        }

I really can't figure out what is wrong, maybe my admin.sql ? here it is
Code:

USE horde;
REPLACE INTO horde_users (user_uid,user_pass)
    VALUES (
        'emir@mail.panel.komentari.info',
        md5('ccc1234xxx'),
);

and I get this error from
Code:

ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 5
so I changed admin.sql to this
Code:

USE horde;
REPLACE INTO horde_users (user_uid,user_pass)
    VALUES ('emir@mail.panel.komentari.info',md5('ccc1234xxx'));

and it executed without sql error .. so that is possible error but I really can't figure out what went wrong .. Any hints ? Thank you in advance

topdog 6th July 2008 09:04

The problem is that horde cannot connect to the mysql database to store the session information.

Please ensure that the details in your horde conf.php are correct and the user can connect to the database from the command line.

c0mrade 7th July 2008 01:44

Thank you for your answer, you were right .. I didn't modify the conf.php properly
Code:

$conf['sessionhandler']['params']['username'] = 'horde';
$conf['sessionhandler']['params']['password'] = 'myhorde';

these fields .. anyways I just pasted these so others can solve the problem if they encounter it .. I have another question though :) now I can't login to horde at all .. I've checked table horde_users and it does have entry and password with md5 in the mysql but still I cannot login, do you perhaps know what is the problem this time .. Thank you

topdog 7th July 2008 08:38

What is the error in the horde log file ?

c0mrade 7th July 2008 12:31

this doesn't appear to be an error but still I don't get transfered anywhere from index or login here is horde.log
Code:

Jul 06 16:19:26 HORDE [error] [horde] FAILED LOGIN for horde [77.77.197.68] to Horde [on line 116 of "/usr/share/horde/login.php"]
Jul 06 16:28:49 HORDE [notice] [horde] Login success for emir@mail.panel.komentari.info [77.77.197.68] to Horde [on line 90 of "/usr/share/ho
rde/login.php"]
Jul 06 16:30:56 HORDE [error] [horde] FAILED LOGIN for admin@mail.panel.komentari.info [77.77.197.68] to Horde [on line 116 of "/usr/share/ho
rde/login.php"]
Jul 06 16:31:40 HORDE [error] [horde] FAILED LOGIN for alma@mail.panel.komentari.info [77.77.197.68] to Horde [on line 116 of "/usr/share/hor
de/login.php"]
Jul 06 16:33:32 HORDE [notice] [horde] Login success for emir@mail.panel.komentari.info [77.77.197.68] to Horde [on line 90 of "/usr/share/ho
rde/login.php"]
Jul 06 16:38:22 HORDE [notice] [horde] Login success for emir@mail.panel.komentari.info [77.77.197.68] to Horde [on line 90 of "/usr/share/ho
rde/login.php"]
Jul 06 16:41:57 HORDE [notice] [horde] Login success for emir@mail.panel.komentari.info [77.77.197.68] to Horde [on line 90 of "/usr/share/ho
rde/login.php"]


topdog 7th July 2008 14:27

even when you login as emir@mail.panel.komentari.info ? because that gets logged as a success

c0mrade 7th July 2008 16:56

I don't know why but it only seemed to accepts logins when using https .. I tried to create virtual host for mail http://hostname entry in httpd.conf but nevermind . Now when I managed to login things get more weird . This is how things look when I login as admin screenshot here.
I get message login failed although I successfully logged in. Once I logged in as admin I added one user alma@mail.panel.komentari.info and here is screenshot when I login with created user. Same thing login failed although I logged in successfully "login failed" .. here is my horde.log
Code:

Jul 07 07:34:35 HORDE [notice] [horde] Login success for emir@mail.panel.komentari.info [77.77.197.68] to Horde [on line 90 of "/usr/share/ho
rde/login.php"]
Jul 07 07:34:47 HORDE [error] [imp] FAILED LOGIN 77.77.197.68 to localhost:143[imap/notls] as emir@mail.panel.komentari.info [on line 258 of
"/usr/share/horde/imp/lib/Auth/imp.php"]
Jul 07 07:34:47 HORDE [error] [imp] FAILED LOGIN 77.77.197.68 to localhost:143[imap/notls] as emir@mail.panel.komentari.info [on line 258 of
"/usr/share/horde/imp/lib/Auth/imp.php"]
Jul 07 07:34:48 HORDE [error] [horde] Error writing session data: MySQL server has gone away [on line 147 of "/usr/share/horde/lib/Horde/Sess
ionHandler/mysql.php"]
Jul 07 07:38:35 HORDE [notice] [horde] Login success for alma@mail.panel.komentari.info [77.77.197.68] to Horde [on line 90 of "/usr/share/ho
rde/login.php"]
Jul 07 07:38:47 HORDE [error] [imp] FAILED LOGIN 77.77.197.68 to localhost:143[imap/notls] as alma@mail.panel.komentari.info [on line 258 of
"/usr/share/horde/imp/lib/Auth/imp.php"]
Jul 07 07:38:50 HORDE [error] [imp] FAILED LOGIN 77.77.197.68 to localhost:143[imap/notls] as alma@mail.panel.komentari.info [on line 258 of
"/usr/share/horde/imp/lib/Auth/imp.php"]
Jul 07 07:40:13 HORDE [error] [imp] FAILED LOGIN 77.77.197.68 to localhost:143[imap/notls] as alma@mail.panel.komentari.info [on line 258 of
"/usr/share/horde/imp/lib/Auth/imp.php"]
Jul 07 07:40:13 HORDE [error] [imp] Error writing session data: MySQL server has gone away [on line 147 of "/usr/share/horde/lib/Horde/Sessio
nHandler/mysql.php"]
Jul 07 07:40:16 HORDE [error] [imp] FAILED LOGIN 77.77.197.68 to localhost:143[imap/notls] as emir@mail.panel.komentari.info [on line 258 of
"/usr/share/horde/imp/lib/Auth/imp.php"]
Jul 07 07:40:17 HORDE [error] [horde] Error writing session data: MySQL server has gone away [on line 147 of "/usr/share/horde/lib/Horde/Sess
ionHandler/mysql.php"]

.. maybe time to try another webmail or ?

topdog 7th July 2008 17:55

Okay i see what is happening, you are logging into horde but the imp login to the imap server fails, check the maillog to see why you cannot login to the imap server.

c0mrade 7th July 2008 18:22

mm I'd like to check it but I don't know what is the location of maillog .. what is the exact file name so I look it up ?

topdog 7th July 2008 18:32

/var/log/maillog


All times are GMT +2. The time now is 00:35.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.