Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-14-2004, 04:12 PM   #1
Registered: May 2004
Location: At Keyboard
Distribution: Mandrake 10.0, SuSE 9.0
Posts: 114

Rep: Reputation: 15
Horde logging via MySQL

I am using
Horde: 2.2.6
IMP: 3.2.1
Turba: 1.2.2
Kronolith: 1.1.2
Nag: 1.1.1

PHP: 4.3.9
Apache-AdvancedExtranetServer: 2.0.48
MySQL: 4.0.18

Each of the above works well, but now I am trying to set up logging via mysql. I have the following in the logging section of /horde/config/horde.php:

$conf['log']['enabled'] = true;
$conf['log']['type'] = 'sql';
$conf['log']['name'] = 'horde_log';
$conf['log']['priority'] = LOG_NOTICE;
$conf['log']['ident'] = 'HORDE';
$conf['log']['params'] = array();
$conf['log']['params']['username'] = 'horde';
$conf['log']['params']['password'] = 'my_horde_pass';
$conf['log']['params']['database'] = 'horde';
$conf['log']['params']['hostspec'] = 'localhost';

I created the table horde.horde_log with the following command (as listed in my /usr/share/pear/Log/sql.php):

CREATE TABLE horde_log (
ident CHAR(16) NOT NULL,
priority INT NOT NULL,
message VARCHAR(200),

The database user horde has SELECT, INSERT, UPDATE, DELETE, CREATE, DROP privs on table horde_log

When I log in (using IMP for authentication), I get
"Notice: Undefined index: dsn in /usr/share/pear/Log/sql.php on line 117

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/pear/Log/sql.php:117) in /var/www/html/horde/imp/redirect.php on line 103

Notice: (null)(): Mailbox is empty (errflg=1) in Unknown on line 0"

I am guessing that I need more log conf. params., although I have no idea what is missing. This error is not present when logging to a file, and mysql works with the above apps except for logging. Any ideas?
Old 11-15-2004, 11:15 PM   #2
Registered: May 2004
Location: At Keyboard
Distribution: Mandrake 10.0, SuSE 9.0
Posts: 114

Original Poster
Rep: Reputation: 15
I figured it out. Instead of

$conf['log']['params']['username'] = 'horde';
$conf['log']['params']['password'] = 'my_horde_pass';
$conf['log']['params']['database'] = 'horde';
$conf['log']['params']['hostspec'] = 'localhost';

I needed

$conf['log']['params']['dsn'] = 'mysql://horde:<my_horde_pass>@localhost/horde';


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Authentication with Dovecot and Horde/IMP alvinlch Linux - General 0 11-07-2005 02:37 AM
MySQL/PHP/Horde "Failed to write session data" Big Money Linux - Software 0 11-23-2004 02:33 PM
Snort and Logging to Mysql. FragInHell Linux - Security 3 09-18-2004 06:16 PM
Trouble Logging in to mysql jevnin Linux - General 6 05-31-2004 01:23 AM
Horde, PHP and MySQL Mux Linux - Software 1 02-25-2004 05:38 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration