Libapache
Debian package libapache-mod-log-sql
Dedicated servers

Find out how to get one of the best dedicated server hosting services available on the market. Have a 160GBytes transfer per month server for only $90 a month !
Get one and start reselling.
CALL NOW ! +1.(302)-213-1611
Shared hosting
Shared hosting service with certified bandwidth, your own IP addresses + SSL + CERT for the same site hosted on both sides of the ocean : YES ! GPL.Host makes it possible for less than $5.5/month !

2. Which version to use

MySQL client lib version:

mod_log_sql_mysql uses the mysql C API, as well as mod_php for apache. They both link against the same library using the same function name. Because of that, they have to be both linked against the same libmysqlclient, otherwise apache will crash. This is absolutly normal, and the authors of both php and mod_sql are not to be blamed.

Our debian repository:

Use the closest mirror next to you (florida or singapore):

deb ftp://ftp.gplhost.com/debian/ stable main
deb ftp://ftp.gplhost.sg/debian/ stable main

For this reason, you have to take a particular care about what version to use according to your setup. First, the "old" version of mod_log_sql for woody is still there. Inside our repository you will find both libapache-mod-log-sql and libapache2-mod-log-sql that are for apache 1.3 and apache 2. Those modules have been compiled using MySQL 4.0, which means libmysqlclient12. If you are using MySQL 4.1, you have to recompile it yourself otherwise apache will segfault. Please take care, even if libmysqlclient12 is installed, you can still compile using libmysqlclient14-dev (or the other way arround) and thus produce a non working binary. Note that in current Debian Sarge, it's using libmysqlclient12.

If you are installing from previous DTC version, you might have a package libapache-mod-log-sql2 installed. We switched back to libapache-mod-log-sql and libapache-mod-log-sql-mysql, so you must remove it before you upgrade.

Also, note that you can't use the "normal" mod_log_sql with the new version of DTC (version 0.17.0-R4 and above) because DTC uses new apache directives for real time bandwidth monitoring. You have to use the pached version from GPLHost.

We hope our patch will be integrated in upstream version of mod_log_sql.

Source version:

If you want our patched version of mod_log_sql source code only, it's there:

mod_log_sql.c
You can also use our CVS using the folowing commands:

# Login and checkout libapache-mod-log-sql from CVS
cvs -d :pserver:anonymous@gplhost.com:/var/lib/cvs login # (password is anoncvs)
cvs -d :pserver:anonymous@gplhost.com:/var/lib/cvs checkout libapache-mod-log-sql
cvs logout


Then simply cd in the directory just created and type dpkg-buildpackage (note: make sure you did apt-get install build-essential). This will produce the necessary debian package. Note that there is also libapache2-mod-log-sql that you can checkout if you are using apache2.

BSD users

Bsd users should simply drop the following scoreboard patch files in /usr/ports/www/mod_log_sql2/files:
patch-mod_log_sql.c - patch-mod_log_sql.h
Then a simple "make install" will install this scoreboard patched version for you. You might need after to add the following directives to your /usr/local/etc/apache/httpd.conf:
LoadModule log_sql_module     libexec/apache/mod_log_sql.so
LoadModule log_sql_mysql_module libexec/apache/mod_log_sql_mysql.so

Gentoo users

Gentoo users should follow the following howto:
# create a local portage directory
mkdir -p /usr/local/portage
echo 'PORTDIR_OVERLAY="/usr/local/portage"'
>> /etc/make.conf
# create the appropriate directory for the new mod_log_sql
mkdir -p /usr/local/portage/net-www/mod_log_sql
# copy the existing mod_log_sql to the new portage
cp -r /usr/portage/net-www/mod_log_sql/*
/usr/local/portage/net-www/mod_log_sql
# add it to the digest
ebuild /usr/local/portage/net-www/mod_log_sql/mod_log_sql-1.100.ebuild digest
# download the patchs to /usr/local/portage/net-www/mod_log_sql/files
wget ftp://ftp.gplhost.com/pub/libapache-mod-log-sql/bsd/patch-mod_log_sql.h
wget ftp://ftp.gplhost.com/pub/libapache-mod-log-sql/bsd/patch-mod_log_sql.c
# add the following to the end of the ebuild
src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/patch-mod_log_sql.c
	epatch "${FILESDIR}"/patch-mod_log_sql.h
}
# make sure /etc/conf.d/apache2 has LOG_SQL defined in APACHE2_OPTS
APACHE2_OPTS="$APACHE2_OPTS -D LOG_SQL"