Hey Tom,
Sorry it took me a while - had some meetings.

Here's how to fix it:
Edit html/includes/common_funcs.php
go to line 180, it should look like this:
$add = "('".$table."', 'HOST', '".$value."', '".$updateTime."'),";
Change it to this:
$add = "('".$table."', 'HOST', '".addslashes($value)."',
'".$updateTime."'),";

(you're adding the "addslashes" command so that it quotes that weird sql
injection)

I'll add this fix to the latest code for the next release also.
Thanks!


On Tue, Apr 29, 2008 at 9:35 AM, Stewart, Tom L. <[EMAIL PROTECTED]>
wrote:

>  I upgraded to 2.9.7 and reset everything. Logging is fine but at 6:00 am
> this morning (same time as the last time) the Cache reload stopped working.
> My guess is there is a bad message that is being sent. Here is part of the
> message from the log file.
>
>
>
> Do I need to go into the sql and find the offending message?
>
>
>
>
>
> Starting to reload cache
>
> 2008-04-29 06:05:01
>
>
>
> Loading the cache with data from: all_logs
>
> Error in "function perform_query()" <br>Mysql_error: You have an error in
> your S
>
> QL syntax; check the manual that corresponds to your MySQL server version
> for th
>
> e right syntax to use near 'YYYYMMDD')', '2008-04-29
> 06:05:02'),('all_logs', 'HO
>
> ST', 'TO_CHAR(new_prdt_end_d' at line 1<br>Query was: INSERT INTO
> search_cache (
>
> tablename, type, value, updatetime) VALUES ('all_logs', 'HOST', '008-04-29
> 06:05:02'),('all_logs', 'HOST', 'll_logs', 'HOST', 'rom', '2008-04-29
> 06:05:02'),('al 'HOST', 'nm', '2008-04-29 06:05:02'),('all_logs', 'HOST',
> '5:02'),('all_logs', 'HOST', '1Error', '2008-04-29 06:05:02'),('all_logs',
> 'HOST', ':02'),('all_logs', 'HOST', 'T', '-04-29 06:05:02'),('all_logs',
> 'HOST', 'gs', 'HOST', ''2008-04-29 06:05:02'),('all_logs', 'HOST', '
> cc01-1000.landsend.com', '2008-04-2
>
>
>
>
>
> Thank you,
>
> Tom
>  ------------------------------
>
> *From:* Clayton Dukes [mailto:[EMAIL PROTECTED]
> *Sent:* Monday, April 28, 2008 2:16 PM
> *To:* Stewart, Tom L.
> *Cc:* [email protected]
> *Subject:* Re: [Php-syslog-ng-support] (no subject)
>
>
>
> Looks like the actual message contains a "("
> can you try quoting that string or removing the (?
>
>  On Mon, Apr 28, 2008 at 11:34 AM, Stewart, Tom L. <
> [EMAIL PROTECTED]> wrote:
>
> ALL,
>
>
>
> I am getting the following error on the cache reload:
>
>
>
> Query failed: You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use near
> 'YYYYMMDD')', '2008-04-28 10:30:23'),('all_logs', 'HOST',
> 'TO_CHAR(new_prdt_end_d' at line 1
>
>
>
>
>
> The above looks like it is missing a ")" ?
>
>
>
>
>
> I am using 2.9.5d on Redhat ES 5.1.
>
>
>
> Any information would be appreciated.
>
>
>
> Thank you,
>
> Tom
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Php-syslog-ng-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/php-syslog-ng-support
>
>
>
>
> --
> ______________________________________________________________
>
> Clayton Dukes
> ______________________________________________________________
>



-- 
______________________________________________________________

Clayton Dukes
______________________________________________________________
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Php-syslog-ng-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/php-syslog-ng-support

Reply via email to