[horde] Could not connect to database for SQL SessionHandler

Peter Horst phorst at ointment.org
Thu Mar 18 16:52:21 PST 2004


I took your advice, which pushed the error down the line to
$HORDE/lib/Prefs/sql.php, where it generated a useful message in
horde.log:

  Mar 18 18:07:35 HORDE [emergency] [imp] DB Error: connect failed:
  [nativecode=Can't connect to local MySQL server through socket
  '/tmp/mysql.sock' (13)] ** Array [on line 108 of
  "/usr/local/apache/htdocs/crispytaters/horde/lib/Prefs/sql.php"]

So I was using the wrong socket.

I set:

$conf['prefs']['params']['socket'] = '/var/tmp/mysql.sock';

and all is well. I trust someone will mention it if this is an
inadvisable approach.

Thanks very much for your help!

Peter

* Wang, Yu <ywang at unf.edu> [2004-03-18  7:45am]:
> Try to comment out the $conf['sessionhandler'] lines to let horde use
> php sessionhandler.
> 
> --Yu Wang
> 
> -----Original Message----- To: horde at lists.horde.org Subject: [horde]
> Could not connect to database for SQL SessionHandler
> 
> I'm trying to set up Horde/IMP for the first time. When I try to
> access login.php, I get the error "Could not connect to database for
> SQL SessionHandler" [line 270 of [...]/lib/SessionHandler/mysql.php]
> 
> MySQL is running and I can connect to 'horde' as 'horde'. The tables
> 'horde_prefs' and 'horde_sessionhandler' exist. Can someone throw out
> a couple of things to check? I think these settings in
> $HORDE/config/horde.php might be relevant:
> 
> $conf['prefs']['driver'] = 'sql'; $conf['prefs']['params'] = array();
> $conf['prefs']['params']['phptype'] = 'mysql';
> $conf['prefs']['params']['hostspec'] = 'localhost';
> $conf['prefs']['params']['protocol'] = 'unix';
> $conf['prefs']['params']['username'] = 'horde';
> $conf['prefs']['params']['password'] = 'password';
> $conf['prefs']['params']['database'] = 'horde';
> $conf['prefs']['params']['table'] = 'horde_prefs';
> 
> $conf['sessionhandler']['type'] = 'mysql';
> $conf['sessionhandler']['params'] = array();
> $conf['sessionhandler']['params']['phptype'] = 'mysql';
> $conf['sessionhandler']['params']['hostspec'] = 'localhost';
> $conf['sessionhandler']['params']['protocol'] = 'unix';
> $conf['sessionhandler']['params']['username'] = 'horde';
> $conf['sessionhandler']['params']['password'] = 'password';
> $conf['sessionhandler']['params']['database'] = 'horde';
> $conf['sessionhandler']['params']['table'] = 'horde_sessionhandler';
> 
> Thanks much,
> 
> Peter

-- 
The older I get, the more I admire and crave competence, just simple
competence, in any field from adultery to zoology.
 -- H. L. Mencken



More information about the horde mailing list