Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82486 - mod_log_sql configuration file is incorrect.
Summary: mod_log_sql configuration file is incorrect.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-18 11:41 UTC by Luca Longinotti (RETIRED)
Modified: 2005-02-20 15:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Rewritten config files. (mod_log_sql_correct.txt,2.61 KB, text/plain)
2005-02-18 13:52 UTC, Luca Longinotti (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Longinotti (RETIRED) gentoo-dev 2005-02-18 11:41:57 UTC
Hi, I've noticed some problems with the shipped mod_log_sql config file (10_mod_log_sql.conf):
1) There is no mention of the LogSQLLoginInfo directive in that file, but that directive is strictly necessary to let the module work! Please add it. (See http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/#Sect.ConfigReference)
2) You use "LogSQLDBParam user loguser" etc. to specify the database connection proprieties, that should be done with LogSQLLoginInfo and thus after the change in 1) these lines are unnecessary.
3) "LogSQLCreateTables on" is there two times, one time it's commented with the mention that it isn't needed, the second time it's there, but like in the first mention: it is not needed since you turn "LogSQLMassVirtualHosting on" earlier.
4) With the new 1.100 version in portage, done with the new Apache ebuild classes, I noticed that also if you use Apache2, the config files is always /usr/portage/net-www/mod_log_sql/files/10_mod_log_sql.conf, and not 10_mod_log_sql_apache2.conf like it should be, thus you get a config file with "LogSQLPreserveFile /var/log/apache/mod_slog_sql_preserve.sql", but with Apache2 it should be "LogSQLPreserveFile /var/log/apache2/mod_slog_sql_preserve.sql".

Reproducible: Always
Steps to Reproduce:
1. Install the package.
2. Take a look at the default configuration file.
Actual Results:  
The mod doesn't work/doesn't work properly.

Expected Results:  
It should be configured correctly and work. :)
Comment 1 Luca Longinotti (RETIRED) gentoo-dev 2005-02-18 13:52:07 UTC
Ok, examining further the config files I also found a typo in the Apache1 config file, it's "LoadModule log_sql_mysql_module extramoudles/mod_log_sql_mysql.so" in the file, but it should be "LoadModule log_sql_mysql_module extramodules/mod_log_sql_mysql.so". To help I'll attach the two rewritten config files. Also in mod_log_sql-1.100.ebuild change line 20 from:
APACHE2_MOD_CONF="${PV}/10_${PN}"
to:
APACHE2_MOD_CONF="${PV}/10_${PN}_apache2"
and then also that should work.
Comment 2 Luca Longinotti (RETIRED) gentoo-dev 2005-02-18 13:52:58 UTC
Created attachment 51548 [details]
Rewritten config files.
Comment 3 Luca Longinotti (RETIRED) gentoo-dev 2005-02-18 14:11:23 UTC
Oups, two little errors in my previous postings:
1) It's not line 20, but line 21.
2) I forgot to mention that you also need to create a config file for Apache2 in the files/1.100/ directory if you use that modify, so you'll end up with:
files/10_mod_log_sql.conf
files/10_mod_log_sql_apache2.conf
files/1.100/10_mod_log_sql.conf
files/1.100/10_mod_log_sql_apache2.conf
The 10_mod_log_sql.conf and 10_mod_log_sql_apache2.conf are both the same as mine, and I tried it and it works.
Comment 4 Luca Longinotti (RETIRED) gentoo-dev 2005-02-19 05:26:35 UTC
Ahh another oups! :) For the files/1.100/10_mod_log_sql*.conf you have to change the LoadModule directives paths from extramodules/ to modules/, then it will work perfectly fine (atm it's logging my webserver, so it does! :D ).
Comment 5 Benedikt Böhm (RETIRED) gentoo-dev 2005-02-20 15:12:22 UTC
> 1) There is no mention of the LogSQLLoginInfo directive

added

> 3) "LogSQLCreateTables on" is there two times

fixed

> 4) With the new 1.100 version in portage, done with the new Apache ebuild classes, I noticed that also if you use Apache2, the config files is always /usr/portage/net-www/mod_log_sql/files/10_mod_log_sql.conf, and not 10_mod_log_sql_apache2.conf like it should be

It shouldn't

> thus you get a config file with "LogSQLPreserveFile /var/log/apache/mod_slog_sql_preserve.sql", but with Apache2 it should be "LogSQLPreserveFile /var/log/apache2/mod_slog_sql_preserve.sql".

fixed by using relative path information in mod_log_sql.conf

i reviewed and completely redid mod_log_sql.conf it's clean now and provides good default behaviour