zm.conf and mysql

Forum for questions and support relating to the 1.24.x releases only.
Locked
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

zm.conf and mysql

Post by timf »

EDIT -
As always after summarizing my problem in a post it causes me to re-think.

I deleted mysql using synaptic for complete removal and then re-installed it. BUT when it asked me for a root password during the install I entered nothing.

This allowed me to set up theZM db in the usual manner and now the ZM console comes up as expected.

next stop testing monitors etc.

++++++++++++++++++++++++++++++++++++++

So i thought I'd have ago at building a new system comprising
Ubuntu 8.10 and ZM 1.24 rc1 2678
I've managed to get ffmpeg compiled in ok and the config / make and make install appears ok.

mysql is running and I can access the zm page of sorts but it complains about zm.conf missing.

here's my config:

./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/include/ffmpeg ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --enable-debug=yes --with-webgroup=www-data --with-webuser=www-data

Here's the end of the make install - not sure if it's terminating correctly.....

make[2]: Entering directory `/usr/local/src/ZoneMinder-1.24.0'
test -z "/usr/local/etc" || /bin/mkdir -p "/usr/local/etc"
/usr/bin/install -c -m 644 'zm.conf' '/usr/local/etc/zm.conf'
make install-data-hook
make[3]: Entering directory `/usr/local/src/ZoneMinder-1.24.0'
( cd /usr/local/etc; chown www-data:www-data zm.conf; chmod 600 zm.conf )
( if ! test -e /var/run; then mkdir /var/run; fi )
( if ! test -e /var/run/zm; then mkdir /var/run/zm; fi; chown www-data:www-data /var/run/zm; chmod u+w /var/run/zm )
make[3]: Leaving directory `/usr/local/src/ZoneMinder-1.24.0'
make[2]: Leaving directory `/usr/local/src/ZoneMinder-1.24.0'
make[1]: Leaving directory `/usr/local/src/ZoneMinder-1.24.0'

when I run zmpgk.pl start I get this:

Warning, overriding installed ./zm.conf file with local copy
DBD::mysql::st execute failed: Table 'zm.Config' doesn't exist at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 92.
Can't execute: Table 'zm.Config' doesn't exist at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 100
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/share/perl/5.10.0/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 45.

I've not been able to get mysql set up without using mysql admin to create the zmuser, zm db and zmpassword.
zm.conf does exist at /usr/local/etc and contains the following -


# Current version of ZoneMinder
ZM_VERSION=1.24.0

# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/usr/local/src/ZoneMinder-1.24.0

# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=1230430376

# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/local/bin

# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/local/lib

# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/usr/local/etc

# Path to ZoneMinder web files
ZM_PATH_WEB=/var/www/html/zm

# Path to ZoneMinder cgi files
ZM_PATH_CGI=/var/www/cgi-bin

# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=www-data
ZM_WEB_GROUP=www-data

# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost

# ZoneMinder database name
ZM_DB_NAME=zm

# ZoneMinder database user
ZM_DB_USER=zmuser

# ZoneMinder database password
ZM_DB_PASS=zmpass

Any suggestions / hints ?

Thanks Tim
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

Not being someone who has ever used ubuntu I have to ask. Do you actually have perl installed in /usr/local ?

I've seen some (self created) installation issues with zm that seem to cause zm to complain about not being able to find zm.conf which can be misleading. Did you install 1.24 over a 1.23 install? Did you make sure that all of the 1.23 files were removed prior to installing 1.24? I can't vouch for a clean removal with make uninstall since I've never done it, but I do seem to recall running into problems installing 1.24 over a 1.23 install without having manually removed the 1.23 files from the perl tree first.

Hint - Being a slackware user I keep /usr/local clean. If you'd prefer to keep zm.conf in /etc (as I do), use the configure option --sysconfdir=/etc .
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

clean install of Ubuntu 8.10 and ZM 1.24...

Post by timf »

I used synaptic to install all the missing files that the ./configure complained about - including the various Perl requirements.

I started of with the latest release of Ubuntu 8.10 from a bit torrent then made sure it was fully updated before proceeding with ZM.

Perl is located in /usr/share - per synaptic install.

Hope this helps.

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

Post by cordel »

Have they fixed the many issues with 8.10 yet?
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Re: clean install of Ubuntu 8.10 and ZM 1.24...

Post by nuck »

Let's see if I can keep this somewhat coherent since I generally tend to try and help others find problems for themselves rather than trying to provide answers. :wink:
timf wrote:I used synaptic to install all the missing files that the ./configure complained about - including the various Perl requirements.
If you search the forums you'll find a list of all required perl modules. Rather than trying the approach of trying to satisfy the missing dependencies as you go, just ensure you have everything required beforehand.
I started of with the latest release of Ubuntu 8.10 from a bit torrent then made sure it was fully updated before proceeding with ZM.
Good course of action.
Perl is located in /usr/share - per synaptic install.

Then you've got a problem. Look at the output you posted again:
when I run zmpgk.pl start I get this:
Warning, overriding installed ./zm.conf file with local copy
DBD::mysql::st execute failed: Table 'zm.Config' doesn't exist at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 92.
Can't execute: Table 'zm.Config' doesn't exist at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 100
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/share/perl/5.10.0/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 45.
What I see here tells me that zm is looking for perl in /usr/local. Something is broken somewhere along the line. (Just don't ask me what.)
Hope this helps.
Not really. :mrgreen: But I hope this helps you.

Nuck
we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

Re: clean install of Ubuntu 8.10 and ZM 1.24...

Post by we4zonM »

nuck wrote:If you search the forums you'll find a list of all required perl modules. Rather than trying the approach of trying to satisfy the missing dependencies as you go, just ensure you have everything required beforehand.
There are a lot of posts in the forums. You could find the wrong post and get an incomplete list? Wouldn't it be better to have it in the Wiki or to give the acutal Forum post that has the perl list of modules?
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Re: clean install of Ubuntu 8.10 and ZM 1.24...

Post by nuck »

we4zonM wrote:There are a lot of posts in the forums. You could find the wrong post and get an incomplete list?
I can't speak for everyone but I took the time to read a few posts and compile a list of modules and then used CPAN to add/update what I needed before I set out to build 1.24 (and 1.23.3). I find it saves a lot of hassles and head scratching in the long run.
Wouldn't it be better to have it in the Wiki or to give the acutal Forum post that has the perl list of modules?
Not all distros come with the same set of perl modules installed but since you asked and in the event that it may help someone else, on a slackware 12.1 system I had to install (in this order):
LWP::UserAgent
Date::Manip
MIME::Lite
MIME::Entity
DBI
DBD::Mysql
X10::ActiveHome
PHP::Serialization
using CPAN and allowing it to automagically fulfill any dependencies along the way.
Locked