[Mod_log_sql] Setting up mod_log_sql

Chris Boler cboler at badsektor.co.nz
Sun Jun 19 03:10:33 EST 2005


Hi all,
I am trying to get mod_log_sql (with mysql in particular) to log to a database
dependant on the hostname of the request etc. I have looked through the docs
and believe I have what I need from this. I also use the vhost dbi mod also
available on outoforder.cc

Here is the current config that I have. The Vhosts are fine, just the logging
isn't: (I have granted insert,create for loguser etc etc)

LoadModule log_sql_module /usr/lib/apache2/modules/mod_log_sql.so
LoadModule log_sql_mysql_module /usr/lib/apache2/modules/mod_log_sql_mysql.so

LogSQLLoginInfo mysql://loguser:passsword@localhost/apachelogs
LogSQLCreateTables on
LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock


<VirtualHost *:80>
  VhostDbiEnabled On
  VhostDbiConnName Server1
  VhostDbiQuery "SELECT ServerName, DocumentRoot, Username FROM vhost_info
WHERE ServerName = &{RequestHostname}"
  LogSQLMassVirtualHosting on
</VirtualHost>


This does not appear to work. The only error I ever get in the apache error
log is:
[Sun Jun 19 19:21:01 2005] [notice] child pid 723 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 724 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 730 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 732 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 734 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 737 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 738 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 739 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 740 exit signal Segmentation
fault (11)
[Sun Jun 19 19:21:01 2005] [notice] child pid 747 exit signal Segmentation
fault (11)

This crashes Apache :/

Any ideas would be appreciated

--Chris





More information about the Mod_log_sql mailing list