View unanswered posts | View active topics It is currently Thu May 23, 2013 1:54 am



Reply to topic  [ 3 posts ] 
A small zmfilter.pl fix 
Author Message

Joined: Mon Dec 10, 2007 6:53 pm
Posts: 194
Location: San Jose, CA
Post A small zmfilter.pl fix
I'm running a Zoneminder 2.22.3 installation and I was having problems running background filters.

If I had a filter with "Name" set with operator "matches", the filter would not work when running in the background. The zmfilter.log file would list an error like:

12/09/07 21:09:02.642208 zmfilter[4676].ERR [Can't execute filter 'select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( E.Archived = 0 and E.Name regexp Event- and E.StartTime <2007>"Does Not Match" case.
On line 378:
$filter_sql .= " not regexp $value";
needs to be changed to
$filter_sql .= " not regexp '$value'";

With those changes, my filters began to work after restarting ZM.


Mon Dec 10, 2007 7:34 pm
Profile WWW
Site Admin
User avatar

Joined: Wed Jul 09, 2003 3:07 pm
Posts: 5221
Location: Bristol, UK
Post 
Thanks for this. Sorry, I forgot to comment at the time when you posted.

_________________
Phil


Thu Dec 20, 2007 6:55 pm
Profile ICQ YIM WWW

Joined: Mon Dec 10, 2007 6:53 pm
Posts: 194
Location: San Jose, CA
Post 
No problem. Thank you for making zoneminder. I really love the software.


Another part in the code to fix is on line 374

$filter_sql .= " regexp $value";

needs to be changed to

$filter_sql .= " regexp '$value'";


Sun Dec 23, 2007 4:54 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Google Adsense [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group