Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,356

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

    A fatal error has occurred
    Could not connect to database for SQL SessionHandler.
    Details have been logged for the administrator.

    Anyone know the fix.

    Thanks!

  2. #2
    Member
    Join Date
    Feb 2004
    Posts
    105

    Default

    SSH to your server and type the following commands:

    #mysql
    #mysql> use horde
    #mysql> repair table horde_sessionhandler;

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,356

    Default

    Quote Originally Posted by electron33 View Post
    SSH to your server and type the following commands:

    #mysql
    #mysql> use horde
    #mysql> repair table horde_sessionhandler;
    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. #4
    Member
    Join Date
    Feb 2004
    Posts
    105

    Default

    I see. The quotes are deprecated in new versions of MySQL.

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2002
    Posts
    686
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    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. #6
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by electron33 View Post
    SSH to your server and type the following commands:

    #mysql
    #mysql> use horde
    #mysql> repair table horde_sessionhandler;
    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. #7
    Member JamesCTotalWeb's Avatar
    Join Date
    Mar 2005
    Posts
    60
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    well I have tried the suggestions from cpanelkenneth but Horde mail still shows the same error.

    Is there a real fix for this?
    When they say it can't be done,
    Thats when they call us.
    TotalWeb-INC
    JC-Hosting
    HillBilly Politics

  8. #8
    Member JamesCTotalWeb's Avatar
    Join Date
    Mar 2005
    Posts
    60
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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
    When they say it can't be done,
    Thats when they call us.
    TotalWeb-INC
    JC-Hosting
    HillBilly Politics

  9. #9
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #10
    Member
    Join Date
    May 2005
    Posts
    57

    Default

    Quote Originally Posted by cpanelkenneth View Post
    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;

    This worked for me!

    Thanks.

Similar Threads & Tags
Similar threads

  1. Replies: 6
    Last Post: 12-21-2010, 12:19 PM
  2. Replies: 12
    Last Post: 01-06-2010, 08:54 PM
  3. Replies: 4
    Last Post: 06-25-2008, 11:03 AM
  4. PHP Won't connect to mySQL
    By deanstev in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 12-04-2007, 08:46 PM
  5. Replies: 0
    Last Post: 05-29-2006, 12:31 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube