[dev] Using SQL for loggin in Horde.

Frederic Trudeau ftrudeau@cam.org
Wed, 14 Aug 2002 18:43:32 -0400


This is a multi-part message in MIME format.

---------------------- multipart/alternative attachment
Is this still possible ?

I've got this schema :=20

CREATE TABLE log_table (
unixtime    int NOT NULL,
ident       char(16) NOT NULL,
priority    int,
message     varchar(200),
primary key (unixtime, ident)
);

And in horde.php :

$conf['log']['params']['dsn'] =3D =
'mysql://hordeuser:hordepass@host/log_table';

- or this -

$conf['log']['dsn'] =3D 'mysql://hordeuser:hordpass@host/log_table';

- or even this -

$conf['log']['name'] =3D 'log_table';
$conf['log']['params'] =3D array();
$conf['log']['params']['hostspec'] =3D 'host';
$conf['log']['params']['username'] =3D 'hordeuser';
$conf['log']['params']['password'] =3D 'hordepass';
$conf['log']['params']['database'] =3D 'horde';

... gives me this error message :

Warning: Undefined index: dsn in /usr/share/pear/Log/sql.php on line 55
Fatal error: Call to undefined function: query() in =
/usr/share/pear/Log/sql.php on line 114

And yes, latest version of PEAR is installed.

Any idea guys ?

---------------------------------------------------
Frederic Trudeau
PHP Coder, Colocation, Development
ftrudeau@cam.org
514.529.3000 ext. 246
---------------------- multipart/alternative attachment
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4915.500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Is this still possible ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've got this schema : </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>CREATE TABLE log_table (<BR>unixtime&nbsp;&nbsp;&nbsp; int NOT=20
NULL,<BR>ident&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char(16) NOT=20
NULL,<BR>priority&nbsp;&nbsp;&nbsp; =
int,<BR>message&nbsp;&nbsp;&nbsp;&nbsp;=20
varchar(200),<BR>primary key (unixtime, ident)<BR>);</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>And in horde.php :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>$conf['log']['params']['dsn'] =3D=20
'mysql://hordeuser:hordepass@host/log_table';<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- or this -</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>$conf['log']['dsn'] =3D=20
'mysql://hordeuser:hordpass@host/log_table';</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>- or even this -</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>$conf['log']['name'] =3D =
'log_table';</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$conf['log']['params'] =3D=20
array();<BR>$conf['log']['params']['hostspec'] =3D=20
'host';<BR>$conf['log']['params']['username'] =3D=20
'hordeuser';<BR>$conf['log']['params']['password'] =3D=20
'hordepass';<BR>$conf['log']['params']['database'] =3D =
'horde';<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>... gives me this error message =
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><STRONG>Warning</STRONG>: Undefined index: dsn in=20
<B>/usr/share/pear/Log/sql.php</B> on line <B>55</B><BR><B>Fatal =
error</B>: Call=20
to undefined function: query() in <B>/usr/share/pear/Log/sql.php</B> on =
line=20
<B>114</B></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>And yes, latest version of PEAR is=20
installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any idea guys ?</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2><BR>---------------------------------------------------<BR>Frede=
ric=20
Trudeau<BR>PHP Coder, Colocation, Development<BR><A=20
href=3D"mailto:ftrudeau@cam.org">ftrudeau@cam.org</A><BR>514.529.3000 =
ext.=20
246</FONT></DIV></BODY></HTML>

---------------------- multipart/alternative attachment--