problem executing zmfilter.pl

Support and queries relating to all previous versions of ZoneMinder
Locked
yakermalo
Posts: 12
Joined: Wed May 04, 2005 5:27 pm

problem executing zmfilter.pl

Post by yakermalo »

Hello, yesterday I noticed, that my filter purgewhenfull doesn't works.
I have a problem executing zmfilter.pll that returns me the next information

DBD::mysql::db prepare_cached warning: at ./zmfilter.pl line 512.
Can't prepare 'select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.Def aultScale,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.V ideoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Mo nitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( 73 >= 67% ) order by E.StartTime asc limit 0, 1000': at /usr/lib/perl5/site_perl/5.8.7/Zone Minder/Debug.pm line 321
ZoneMinder::Debug::Fatal('Can\'t prepare \'select E.Id,E.MonitorId,M.Nam e as MonitorNam...') called at ./zmfilter.pl line 512
main::checkFilter('HASH(0x8727368)') called at ./zmfilter.pl line 181


Could you say me, where is the problem here, i think that could be something about perl modules.

REGARDS
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

It doesn't actually say what the error is unfortunately. Can you confirm that the space in the folloiwng section
E inner join Mo nitors as M
between the 'o' and 'n' is from your posting and not the error as there should not be one there.
Phil
yakermalo
Posts: 12
Joined: Wed May 04, 2005 5:27 pm

Post by yakermalo »

No, the espace between o and n is not a real space i'have copied and pasted, it's only for this cause.

So you don't know whast the possible cause? could be the perl modules? i think that it had been compiled specially for the machine that runs ZM.........
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I would try a couple of things. One try executing the sql statement that is output in the error directly in the mysql command line client to check that the syntax is ok. Then just create a simple perl script with a few simple sql statements in to check that the perl database modules work properly.

Something like

Code: Select all

#!/usr/bin/perl -w 

use ZoneMinder;

my $dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );

my $sql = "select * from Monitors";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
while( my $monitor = $sth->fetchrow_hashref() )
{
     print( $monitor->{Name}."\n" );
}
though this is just from memory and not tested :?
Phil
yakermalo
Posts: 12
Joined: Wed May 04, 2005 5:27 pm

Post by yakermalo »

thanks, about the information, the problem was the percent symbol.......... :x

now we have a segmentation fault with ZMaudit, we are investigating about the cause of


Thanks a lot
yakermalo
Posts: 12
Joined: Wed May 04, 2005 5:27 pm

the problem was fixed

Post by yakermalo »

Hi again, the problem, was fixed updating perl modules, there was a conflict with the libraries.

ZM is running well

THANKS a Lot :) :)
Locked