The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Horde is broken, won't connect ot database!!!

Discussion in 'General Discussion' started by DWHS.net, Jan 3, 2007.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    A fatal error has occurred
    Could not connect to database for SQL SessionHandler.
    Details have been logged for the administrator.

    Anyone know the fix. :eek:

    Thanks!
     
  2. electron33

    electron33 Well-Known Member

    Joined:
    Feb 24, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    16
    SSH to your server and type the following commands:

    #mysql
    #mysql> use horde
    #mysql> repair table horde_sessionhandler;
     
  3. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Nope doesn't fix it, but thanks for the try.

    Both times cpanel fixed it they said this:

    I have edited /root/.my.cnf and removed the quotes and Horde is now working properly.

    and this:

    I've removed the extra quotes, and it should be working now. Let me know if you continue to experience this problem.

    But that file only has double quotes. Not sure what quotes to remove and from what line??

    Thanks
     
  4. electron33

    electron33 Well-Known Member

    Joined:
    Feb 24, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    16
    I see. The quotes are deprecated in new versions of MySQL.
     
  5. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Im getting this error and i dont have any quotes in my.cnf

    Im not using a remote mysql server either

    anyone know how to fix this?

    Ive done a forced upcp a forcedhordereset and run a repai on the horde database but still no joy
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    That won't work on the horde_sessionhandler table since it's of type InnoDB, which doesn't support repair. One can try CHECK TABLE horde_sessionhandler, but the sureset option is to drop the table and recreate it:

    > drop table horde_sessionhandler;
    > CREATE TABLE horde_sessionhandler (
    session_id VARCHAR(32) NOT NULL,
    session_lastmodified INT NOT NULL,
    session_data LONGBLOB,
    PRIMARY KEY (session_id)
    ) ENGINE = InnoDB;
     
  7. JamesCTotalWeb

    JamesCTotalWeb Well-Known Member

    Joined:
    Mar 20, 2005
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    well I have tried the suggestions from cpanelkenneth but Horde mail still shows the same error.

    Is there a real fix for this?
     
  8. JamesCTotalWeb

    JamesCTotalWeb Well-Known Member

    Joined:
    Mar 20, 2005
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Well for the next person this happens to you might try this from shell

    /usr/local/cpanel/bin/update-horde --force

    It worked for us
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I'm glad you got it working. For future reference, here are some steps that will either fix the problem, or provide more clues:

    • Check that the horde_sessionhandler is not corrupted. If it is, the drop and create statements I posted above will resolve this particular issue.
    • Verify the horde user has proper permissions on the horde_sessionhandler table. Specifically it should have select, insert, update and delete permissions. If not, then grant them:
      Code:
      > GRANT SELECT, INSERT, UPDATE, DELETE ON horde_sessionhandler TO horde@localhost;
      > FLUSH PRIVILEGES;
      
    • Enable logging in Horde. Edit the file /usr/local/cpanel/base/horde/config/conf.php:
      Code:
      // change
       $conf['log']['enabled'] = false;
      
      // to
      $conf['log']['enabled'] = true;
      
      // change 
      $conf['log']['priority'] = PEAR_LOG_WARN;
      
      // to
      $conf['log']['priority'] = PEAR_LOG_DEBUG;
      
      Try logging into Horde, then check the file created in /tmp. It will be named some thing like horde_123445.log

    • You can also enable MySQL error logging on the off chance something appears there. Edit /etc/my.cnf to contain:
      Code:
      log-error=/var/log/mysql.log
      
      You can place the log whereever you want (some opt for /var/lib/mysql/mysql.log)
     
  10. dinfiesta

    dinfiesta Well-Known Member

    Joined:
    May 2, 2005
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6

    This worked for me!

    Thanks.
     
Loading...

Share This Page