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.
A small zmfilter.pl fix
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact: