Having problem with HikVision.pm

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
tafollaj
Posts: 7
Joined: Mon Aug 27, 2018 5:13 am

Having problem with HikVision.pm

Post by tafollaj » Tue Mar 26, 2019 8:55 pm

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.

rockedge
Posts: 1098
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Having problem with HikVision.pm

Post by rockedge » Wed Mar 27, 2019 12:19 am

check to make sure the permissions on /etc/zm/zm.conf are correct and match the Apache user !!

User avatar
knight-of-ni
Posts: 2228
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Having problem with HikVision.pm

Post by knight-of-ni » Wed Mar 27, 2019 12:04 pm

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.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

tafollaj
Posts: 7
Joined: Mon Aug 27, 2018 5:13 am

Re: Having problem with HikVision.pm

Post by tafollaj » Wed Mar 27, 2019 9:27 pm

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.

tafollaj
Posts: 7
Joined: Mon Aug 27, 2018 5:13 am

Re: Having problem with HikVision.pm

Post by tafollaj » Wed Mar 27, 2019 9:35 pm

Ok, got it working! The protocol wasn't set in the control definition for HikVision. Thanks for the help, much appreciated!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests