[Mod_log_sql] problem with mod_log_sql + frontpage
Brad Schuetz
brad at omnis.com
Fri Aug 27 14:58:31 EST 2004
Edward Rudd wrote:
> It looks as though it's front page or one of your other modules. Some
> other module is altering the servername that I use in mod_log_sql.
> Around line 800 in the mod_log_sql.c source file, there is a line that
> says
>
> /* Determint the hostname and convert it to all lower-case; */
> char *servername = apr_pstrdup(orig->pool,(char
> *)ap_get_server_name(orig));
>
> Add this line right after after that.
>
> log_error(APLOG_MARK, APLOG_ERR, 0, orig->server,
> "incoming Server name '%s'",servername);
>
> This will log what the servername that mod_log_sql retrieved from apache
> is.. when you run across one of these "boken SQL queries" the error_log
> should contain the whole mess that was in the query as well, if it does
> then I'm sure it's something else screwing things up. Make sure you
> have ErrorLog log/somelogfile set inside of the virtualhost you are
> using for the frontpage site that's causing the problems.
You are correct. The garbage is coming from apache/frontpage.
I did however find a bug in mod_log_sql though. The '-' character isn't
being translated into anything else and mysql does not allow a - to
exist in a table name.
--
Brad Schuetz - brad at omnis.com
Systems Administrator
Omnis Network, LLC
More information about the Mod_log_sql
mailing list