[Mod_log_sql] Setting up mod_log_sql

Chris Boler cboler at badsektor.co.nz
Sun Jun 19 03:18:32 EST 2005


here is further output from error logs in debug level:

[Sun Jun 19 19:32:13 2005] [info] PAM: mod_auth_pam/2.0-1.1
[Sun Jun 19 19:32:13 2005] [info] GROUP: mod_auth_sys_group/2.0-1.1
[Sun Jun 19 19:32:13 2005] [info] PAM: mod_auth_pam/2.0-1.1
[Sun Jun 19 19:32:13 2005] [info] GROUP: mod_auth_sys_group/2.0-1.1
[Sun Jun 19 19:32:13 2005] [notice] mod_python: Creating 20 session mutexes
based on 20 max processes and 0 max threads.
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql_mysql.c(54): HOST: 'localhost'
PORT: '3306' DB: 'apachelogs' USER: 'loguser' SOCKET:
'/var/run/mysqld/mysqld.sock'
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql.c(450): mod_log_sql:
open_logdb_link successful
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql_mysql.c(54): HOST: 'localhost'
PORT: '3306' DB: 'apachelogs' USER: 'loguser' SOCKET:
'/var/run/mysqld/mysqld.sock'
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql.c(450): mod_log_sql:
open_logdb_link successful
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql_mysql.c(54): HOST: 'localhost'
PORT: '3306' DB: 'apachelogs' USER: 'loguser' SOCKET:
'/var/run/mysqld/mysqld.sock'
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql.c(450): mod_log_sql:
open_logdb_link successful
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql_mysql.c(54): HOST: 'localhost'
PORT: '3306' DB: 'apachelogs' USER: 'loguser' SOCKET:
'/var/run/mysqld/mysqld.sock'
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql.c(450): mod_log_sql:
open_logdb_link successful
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql_mysql.c(54): HOST: 'localhost'
PORT: '3306' DB: 'apachelogs' USER: 'loguser' SOCKET:
'/var/run/mysqld/mysqld.sock'
[Sun Jun 19 19:32:13 2005] [debug] mod_log_sql.c(450): mod_log_sql:
open_logdb_link successful
[Sun Jun 19 19:32:13 2005] [notice] Embperl/2.0rc3 Apache/2.0.54 (Debian
GNU/Linux) mod_auth_kerb/5.0-rc6 DAV/2 SVN/1.1.4 mod_jk2/2.0.4
mod_ldap_userdir/1.1.7 mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-15
proxy_html/2.4 mod_dbi_pool/0.1.0 mod_vhost_dbi/0.1.0 mod_perl/1.999.21
Perl/v5.8.4 configured -- resuming normal operations
[Sun Jun 19 19:32:13 2005] [info] Server built: May 12 2005 05:30:44
[Sun Jun 19 19:32:13 2005] [debug]
/home/adconrad/apache2/apache2-2.0.54/build-tree/apache2/server/mpm/prefork/prefork.c(956):
AcceptMutex: sysvsem (default: sysvsem)
[Sun Jun 19 19:32:19 2005] [notice] child pid 868 exit signal Segmentation
fault (11)
[Sun Jun 19 19:32:19 2005] [debug] mod_log_sql_mysql.c(54): HOST: 'localhost'
PORT: '3306' DB: 'apachelogs' USER: 'loguser' SOCKET:
'/var/run/mysqld/mysqld.sock'
[Sun Jun 19 19:32:19 2005] [debug] mod_log_sql.c(450): mod_log_sql:
open_logdb_link successful


"Chris Boler" <cboler at badsektor.co.nz> wrote:

> 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
> 
> 
> _______________________________________________
> Download the latest version at
> http://www.outoforder.cc/projects/apache/mod_log_sql/
> 
> To unsubscribe send an e-mail to 
> mod_log_sql-unsubscribe at lists.outoforder.cc
> 






More information about the Mod_log_sql mailing list