Install troubles with SQL and missing constants

Support and queries relating to all previous versions of ZoneMinder
Locked
Ekki
Posts: 2
Joined: Sun Jun 12, 2005 6:53 pm

Install troubles with SQL and missing constants

Post by Ekki »

Hi,
today I installed zm-1.21.4 on a SuSE 9.1 box.

Environment:

Code: Select all

kernel: Linux genepi 2.6.5-7.201-default #1 Thu Aug 25 06:20:45 UTC 2005 i686 i686 i386 GNU/Linux
ZM: zm-1.21.4 as of 11.Nov.2005
Configuration:
configure --with-webuser=wwwrun --with-wwwgroup=www --with-webdir=/srv/www/htdocs --with-cgidir=/srv/www/cgi-bin

perl ./zmconfg.pl (I used mostly defaults)

make without errors

Two problems:

1.) When running the command to init the MySQL db:

Code: Select all

genepi:~/zm-1.21.4 # mysql mysql < db/zmschema.sql -pxxxxxxxxx
ERROR 1136 at line 378: Column count doesn't match value count at row 1

In phpMyAdmin I can see that various tables are installed in db ZM, but I have no way to make sure they are complete/correct.

2.)
I don't want to start ZM automatically in init.d, so I followed the suggested manual start with

Code: Select all

genepi:/usr/local/bin # zmpkg.pl start
Bareword "ZM_PATH_LOGS" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 78.
BEGIN not safe after errors--compilation aborted at /usr/local/bin/zmpkg.pl line 79.
Ok, so I added the constant ZM_PATH_LOGS, but that got me to:

Code: Select all

genepi:/usr/local/bin # zmpkg.pl start
Bareword "ZM_SHM_KEY" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 134.
Bareword "ZM_OPT_FRAME_SERVER" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 263.
Bareword "ZM_OPT_CONTROL" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 275.
Bareword "ZM_OPT_TRIGGERS" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 287.
Bareword "ZM_OPT_X10" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 291.
Bareword "ZM_CHECK_FOR_UPDATES" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 296.
Execution of /usr/local/bin/zmpkg.pl aborted due to compilation errors.
That's where I thought there is major trouble...
I reran the configure and perl zmconfig.pl scripts, no change.

Any hints?

Thanks,
Ekki
Ekki
Posts: 2
Joined: Sun Jun 12, 2005 6:53 pm

Post by Ekki »

Further to my problems posted yesterday I ran into more today:

I re-ran"perl zmconfig.pl".
During that run I got errors when entering an email adress of where notifications should be sent.

Code: Select all

The email address to send matching event details to (your.name@your.domain) [] : xx@xxxxx.xx
Backslash found where operator expected at (eval 5) line 1, near "$1\"
        (Missing operator before \?)
String found where operator expected at (eval 5) line 1, at end of line
        (Missing operator before ?)
After finishing zmconfig.pl I got

Code: Select all

Saving config to 'zmconfig.txt'
Use of uninitialized value in concatenation (.) or string at ./zmconfig.pl line 1724, <> line 129.
Use of uninitialized value in concatenation (.) or string at ./zmconfig.pl line 1724, <> line 129.
Use of uninitialized value in concatenation (.) or string at ./zmconfig.pl line 1724, <> line 129.
Saving config to DB
DBD::mysql::st execute failed: Column 'Value' cannot be null at ./zmconfig.pl line 1778, <> line 129.
Can't execute: Column 'Value' cannot be null at ./zmconfig.pl line 1778, <> line 129.
genepi:~/zm-1.21.4 #
Any hints?

Thanks,
Ekki
User avatar
acrid
Posts: 68
Joined: Sun Aug 24, 2003 10:26 pm
Location: Germany

Column count doesn't match value count at row 1

Post by acrid »

i ran into the same bug. obviously something has changed with the number of columns a user "needs". to solve it quickly i :

1) used phpmyadmin to delete the tables inside the zm db

2) deleted line 378 from db/zmschema.sql

3) ran

Code: Select all

mysql zm -u root -p < db/zmschema.sql
4) used phpmyadmin to run

Code: Select all

INSERT INTO `Users` ( `Id` , `Username` , `Password` , `Language` , `Enabled` , `Stream` , `Events` , `Control` , `Monitors` , `System` , `MaxBandwidth` , `MonitorIds` )VALUES ('', 'admin',PASSWORD( 'admin'), 'de_de', '1', 'View', 'Edit', 'Edit', 'Edit', 'Edit', '', '');
beware... "de_de" is german... you should replace it with your language (en_gb or something iirc)

cheers
Locked