Filters : Help ! uninitialized value in substitution

Support and queries relating to all previous versions of ZoneMinder
jose
Posts: 2
Joined: Thu Aug 26, 2004 12:45 pm

Filters : Help ! uninitialized value in substitution

Post by jose »

Hello all and a big thanx for your work,

I just installed my zoneminder and I get lots of trouble while trying to run filters and email notification.

Here are the errors :

Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line 906.
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/zmfilter.pl line 708.
Sending notification email ''
Can't send email: can't build entity: no body, and not multipart

Is there a way to fix it ? :?:
RedFlyer
Posts: 76
Joined: Sat Aug 20, 2005 2:57 pm
Location: Belgium

Post by RedFlyer »

Hi all,

I have the same problem ...
Is there anybody there to help us !!

Regards,

Oliver
________
Model T Engine
Last edited by RedFlyer on Mon Feb 14, 2011 5:17 am, edited 1 time in total.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i use email fine but i am on te live cd. sounds like a config error when it was built but beyond me sorry

James
RedFlyer
Posts: 76
Joined: Sat Aug 20, 2005 2:57 pm
Location: Belgium

Post by RedFlyer »

jameswilson wrote:i use email fine but i am on te live cd. sounds like a config error when it was built but beyond me sorry

James
Thanks James :wink:
Yes i'm working wiith a build 1.21.3 version under CENTOS 4.1
After solving PERL module issue (Installing the required module) still got errors in zmfilter.log
________
Colorado marijuana dispensary
Last edited by RedFlyer on Mon Feb 14, 2011 5:17 am, edited 1 time in total.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

you still getting the same error as on 1st post
RedFlyer
Posts: 76
Joined: Sat Aug 20, 2005 2:57 pm
Location: Belgium

Post by RedFlyer »

jameswilson wrote:you still getting the same error as on 1st post
Yes
________
NEW JERSEY MARIJUANA DISPENSARIES
Last edited by RedFlyer on Mon Feb 14, 2011 5:17 am, edited 1 time in total.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

A couple of things.

1) Have to set the email config up in Options->Email?
2) Which version are you running? The errors in the first post on this thread don't correspond to culpable lines on my setup for 1.21.3.

Phil
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

The errors in the first post on this thread don't correspond to culpable lines for any of the past 1.2x.x versions that I have. I have dumped any builds before that.
Also please include any errors in your logs that might relate.
Regards,
Cordel
RedFlyer
Posts: 76
Joined: Sat Aug 20, 2005 2:57 pm
Location: Belgium

Post by RedFlyer »

zoneminder wrote:A couple of things.

1) Have to set the email config up in Options->Email?
2) Which version are you running? The errors in the first post on this thread don't correspond to culpable lines on my setup for 1.21.3.

Phil
Hi Phil,

1) Yes i have set the email config in Options
2) I'm running version 1.21.3 on a CENTOS 4.1 distro (the first post as you know come from 1.19.x forum, but the problem was similar, that's why i've posted there)

Here is a copy of zmfliter.log

Code: Select all

09/07/2005 02:54:48.828267 zmfilter[3784].INF [Creating notification email]
Use of uninitialized value in pattern match (m//) at /usr/local/bin/zmfilter.pl line994.
Use of uninitialized value in pattern match (m//) at /usr/local/bin/zmfilter.pl line1009.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1034.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1035.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1036.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1037.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1038.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1039.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1039.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1040.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1041.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1042.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1043.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1044.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1045.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1046.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1047.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1048.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1049.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1050.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1051.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1052.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1053.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1054.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1055.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1056.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1085.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1087.
Use of uninitialized value in pattern match (m//) at /usr/local/bin/zmfilter.pl line994.
Use of uninitialized value in pattern match (m//) at /usr/local/bin/zmfilter.pl line1009.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1034.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1035.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1036.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1037.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1038.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1039.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1040.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1041.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1042.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1043.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1044.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1045.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1046.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1047.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1048.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1049.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1050.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1051.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1052.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1053.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1054.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1055.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1056.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1074.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1085.
Use of uninitialized value in substitution (s///) at /usr/local/bin/zmfilter.pl line1087.
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/zmfilter.pl line 826.
09/07/2005 02:54:48.829048 zmfilter[3784].INF [Sending notification email '']
Use of uninitialized value in pattern match (m//) at /usr/local/bin/zmfilter.pl line860.
Can't send email: can't build entity: no body, and not multipart
If you need to know more, ask me.

Best regard,

Oliver
________
OMEGA
Last edited by RedFlyer on Mon Feb 14, 2011 5:17 am, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Okay,
Now that helps some ;)

First error on line 994

Code: Select all

my $need_monitor = $text =~ /%(?:MET|MEH|MED|MEW|MEN|MEA)%/;
Line 1009

Code: Select all

my $need_images = $text =~ /%(?:EPI1|EPIM|EI1|EIM)%/;
Line 1034 to 1056
after my $url = ZM_URL;

Code: Select all

	$text =~ s/%ZP%/$url/g;
	$text =~ s/%MN%/$event->{MonitorName}/g;
	$text =~ s/%MET%/$monitor->{EventCount}/g;
	$text =~ s/%MEH%/$monitor->{HourEventCount}/g;
	$text =~ s/%MED%/$monitor->{DayEventCount}/g;
	$text =~ s/%MEW%/$monitor->{WeekEventCount}/g;
	$text =~ s/%MEM%/$monitor->{MonthEventCount}/g;
	$text =~ s/%MEA%/$monitor->{ArchEventCount}/g;
	$text =~ s/%MP%/$url?view=watch&mid=$event->{MonitorId}/g;
	$text =~ s/%MPS%/$url?view=watchfeed&mid=$event->{MonitorId}&mode=stream/g;
	$text =~ s/%MPI%/$url?view=watchfeed&mid=$event->{MonitorId}&mode=still/g;
	$text =~ s/%EP%/$url?view=event&mid=$event->{MonitorId}&eid=$event->{Id}/g;
	$text =~ s/%EPS%/$url?view=event&mode=stream&mid=$event->{MonitorId}&eid=$event->{Id}/g;
	$text =~ s/%EPI%/$url?view=event&mode=still&mid=$event->{MonitorId}&eid=$event->{Id}/g;
	$text =~ s/%EI%/$event->{Id}/g;
	$text =~ s/%EN%/$event->{Name}/g;
	$text =~ s/%ET%/$event->{StartTime}/g;
	$text =~ s/%ED%/$event->{Length}/g;
	$text =~ s/%EF%/$event->{Frames}/g;
	$text =~ s/%EFA%/$event->{AlarmFrames}/g;
	$text =~ s/%EST%/$event->{TotScore}/g;
	$text =~ s/%ESA%/$event->{AvgScore}/g;
	$text =~ s/%ESM%/$event->{MaxScore}/g;
I think you may need a perl module.
Check and make sure you have these installed.
MIME::Lite
Net::SMTP
or
MIME::Entity

and also these
Time::HiRes
Date::Manip
Data::Dumper
Getopt::Long

Oh, buy the way don't forget to set a time restriction in your filters for mailing. I have months of video stored and while testing for your issue did just a simple two line filter. ZM has a boolen value in its database so it knows if it sent an event or not but you should set a time restriction like say the last half hour or you might end up with a thousand emails while ZM trys to comply with your filter :lol:
Regards,
Cordel
RedFlyer
Posts: 76
Joined: Sat Aug 20, 2005 2:57 pm
Location: Belgium

Post by RedFlyer »

cordel wrote: I think you may need a perl module.
Check and make sure you have these installed.
MIME::Lite
Net::SMTP
or
MIME::Entity

and also these
Time::HiRes
Date::Manip
Data::Dumper
Getopt::Long

Oh, buy the way don't forget to set a time restriction in your filters for mailing. I have months of video stored and while testing for your issue did just a simple two line filter. ZM has a boolen value in its database so it knows if it sent an event or not but you should set a time restriction like say the last half hour or you might end up with a thousand emails while ZM trys to comply with your filter :lol:
Regards,
Cordel
Hi Corey,

I already checked that all necessary PERL module are installed.
I just had some doubt about MIME::Lite that seemed not being installed, have (re)installed but I still have the same issue.
While defining more strict filter to avoid tons of mail :wink: i got sql syntax errors. On my CENTOS 4.1 distro, i use MySQL 4.1.10a. Does ZM work fine with this version ?
________
Marijuana Strains
Last edited by RedFlyer on Mon Feb 14, 2011 5:17 am, edited 1 time in total.
RedFlyer
Posts: 76
Joined: Sat Aug 20, 2005 2:57 pm
Location: Belgium

Post by RedFlyer »

Corey, Phil,

Could you please give me a way to verify that necessary PERL module are installed, to be sure that i do that the right way. As said before, i use CENTOS 4.1 (based on RHEL4)

Best regards,

Oliver
________
MFLB VAPORIZER
Last edited by RedFlyer on Mon Feb 14, 2011 5:17 am, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Hi Oliver,
I had put a list of requirements in the Hints and Tips topic.
http://www.zoneminder.com/forums/viewtopic.php?p=9614
This should be fairly compleate.

Regards,
Cordel
RedFlyer
Posts: 76
Joined: Sat Aug 20, 2005 2:57 pm
Location: Belgium

Post by RedFlyer »

cordel wrote:Hi Oliver,
I had put a list of requirements in the Hints and Tips topic.
http://www.zoneminder.com/forums/viewtopic.php?p=9614
This should be fairly compleate.

Regards,
Cordel
Hi Corey,

I've seen that, but my question was, how to verify that these modules are installed in my system. To be sure that i'm doing that the right way.

Regards,

Oliver
________
OG KUSH SEEDS
Last edited by RedFlyer on Mon Feb 14, 2011 5:17 am, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

There are several ways do find out.
yum list *perl*

This will show you all RPMs installed and whats not installed but if you used CPAN those will not show up in the list.
I run CentOS release 3.5 and I know that all the required modules were not part of the base, updates, or extras repositories and I had to package them my self then install them (I try to stay consistant so everything is packed to install).
You could also do a locate or find *.pm and look to see if they are installed but you will need to referance perl.org to see what the modules represent.
The modules missing in 3.5 which the mail script needs are:
MIME::Lite
Net::SMTP
or
MIME::Entity
and
Data::Dumper
Getopt::Long

You should be able to see the errors for the moduals in the zm logs.
Regards,
Cordel
Locked