Page 1 of 1

Having problem with HikVision.pm

Posted: Tue Mar 26, 2019 8:55 pm
by tafollaj
I am having trouble getting the Hikvision controls working and I was getting an command = undefined error. I ran perl HikVision.pm and got the following:

/usr/share/perl5/ZoneMinder/Control$ perl HikVision.pm
WARNING: ZoneMinder configuration file found but is not readable. Check file permissions on /etc/zm/zm.conf
WARNING: ZoneMinder configuration file found but is not readable. Check file permissions on /etc/zm/conf.d/zmcustom.conf
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/share/perl5/ZoneMinder/Config.pm line 93.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 102.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 117.
DBI connect('database=;host=','',...) failed: Access denied for user 'pollosanto'@'localhost' (using password: NO) at /usr/share/perl5/ZoneMinder/Config.pm line 117.
Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 166.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 166.
Compilation failed in require at /usr/share/perl5/ZoneMinder/Logger.pm line 90.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Logger.pm line 90.
Compilation failed in require at HikVision.pm line 46.
BEGIN failed--compilation aborted at HikVision.pm line 46.


Does anyone know what the problem is here? Thanks.

Re: Having problem with HikVision.pm

Posted: Wed Mar 27, 2019 12:19 am
by rockedge
check to make sure the permissions on /etc/zm/zm.conf are correct and match the Apache user !!

Re: Having problem with HikVision.pm

Posted: Wed Mar 27, 2019 12:04 pm
by knight-of-ni
tafollaj wrote:
Tue Mar 26, 2019 8:55 pm
DBI connect('database=;host=','',...) failed: Access denied for user 'pollosanto'@'localhost' (using password: NO) at /usr/share/perl5/ZoneMinder/Config.pm line 117.
You can't call the zoneminder scripts or binaries from the command line as a normal user. They will only run as the root user or the web account user.

Re: Having problem with HikVision.pm

Posted: Wed Mar 27, 2019 9:27 pm
by tafollaj
Thank you, I forgot to sudo. Regarding the problem I am having, this is the error I get when I try to use the controls. Am I missing a component in my install?


2019-03-27 14:21:45 zmcontrol 2301 FAT Can't load ZoneMinder::Control::Can't locate ZoneMinder/Control/.pm in @INC (you may need to install the ZoneMinder::Control:: module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl/5.26/Module/Load.pm line 77.Can't locate ZoneMinder/Control/ in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl/5.26/Module/Load.pm line 77.

Re: Having problem with HikVision.pm

Posted: Wed Mar 27, 2019 9:35 pm
by tafollaj
Ok, got it working! The protocol wasn't set in the control definition for HikVision. Thanks for the help, much appreciated!

Re: Having problem with HikVision.pm

Posted: Thu Oct 31, 2019 11:26 pm
by kobold81
what is the protocol please and where do I have to enter this?

Re: Having problem with HikVision.pm

Posted: Tue Jan 12, 2021 2:16 pm
by JasonBorn
kobold81 wrote:
Thu Oct 31, 2019 11:26 pm
what is the protocol please and where do I have to enter this?
Have you solved this problem? I'm at the moment on the same problem.