Page 1 of 1

zmfilter.pl errors running filter

Posted: Sun Feb 01, 2004 11:40 pm
by qwe10730
Hi,

I have a filter that I have defined to delete old events. It's not the only filter and I now have the filters working correctly. However when zmfilter tries to run this filter automatically I get errors in the log file:

Use of uninitialized value in localtime at /usr/local/bin/zmfilter.pl line 141.
Use of uninitialized value in localtime at /usr/local/bin/zmfilter.pl line 141.

Looking at zmfilter.pl, line 141 is

return( localtime(UnixDate( $date_str, '%s' )) );

I take it that this implies that $date_str is unset.

What am I doing wrong?

Russell.

Re: zmfilter.pl errors running filter

Posted: Mon Feb 02, 2004 12:21 pm
by fernando
ahaaaaaaaaa......

so iam not crazy. :)
i get same error sinse 0.9.16...
i still dont have any idea how to fix it..

http://www.zoneminder.com/forum_general ... 116e2a48ba
http://www.zoneminder.com/forum_general ... afd52d9275

and this problem has came sinse this..
http://www.zoneminder.com/forum_general ... f75d453fe2

Re: zmfilter.pl errors running filter

Posted: Mon Feb 02, 2004 12:44 pm
by zoneminder
Did you try my last suggestion Fernando? Did it make any difference?

Phil,

Re: zmfilter.pl errors running filter

Posted: Mon Feb 02, 2004 12:56 pm
by fernando
mmm i did't get your suggestion!

what was it..?


iam interesting in get Ross Melin mandrake live cd. so i can test a diferent scenario.
http://www.zoneminder.com/forum_install ... 8c8910996b

do you have it? you will put it on the web?

Re: zmfilter.pl errors running filter

Posted: Mon Feb 02, 2004 1:33 pm
by zoneminder
He is posting it to me. Once I get it I will put it up. We did try once before but I couldn't get the ISO off the CD properly so this is our second go.

The suggestion I made about your filter problems (a couple of weeks ago) was just

"Can you change your filter to use '-1 hour' instead of 'last hour' and see if that makes any difference."

Did you try that?

Phil,

Re: zmfilter.pl errors running filter

Posted: Mon Feb 02, 2004 9:59 pm
by fernando
yes... semms to run ok. i cant.. use -1 hour works..
were you tell this? how did i miss that?

well... i will tell you if some new bug is found.

Re: zmfilter.pl errors running filter

Posted: Tue Feb 03, 2004 2:13 pm
by qwe10730
I changed the filter from using last day to using -1 day and it now works. Thanks Phil.

What puzzles me though is that the filter works fine when run via the web interface but not when run automatically. i guess this is the difference between the Perl and PHP date formats.

Russell.

Re: zmfilter.pl errors running filter

Posted: Wed Feb 04, 2004 12:51 pm
by zoneminder
Yes Russell. You are correct. The web pages use strtotime to parse date/times while the perl functions use UnixDate from the Date::Manip package. They are quite similar but obviously have some subtle differences. I've made a note to see if I can put a more useful error message into zmfilter to indicate this.

Phil,