Page 2 of 3

Posted: Sun Jan 22, 2006 10:25 pm
by zarkov
Just out of interest, I had a similar problem when upgrading from version 1.21.4.

I found that if I ran zmfix and zmupdate -f as root, all was fine afterwards. Saved me having to re-install from scratch.

Posted: Tue Jan 24, 2006 9:57 pm
by rl03
Same problem on a fresh install of 1.22.0

running the first version of the test script gives:
ZM_SHM_KEY

Second version gives:
Undefined subroutine &main::ZM_SHM_KEY called at ./test line 9.

mysql query returns a row.

Posted: Tue Jan 24, 2006 10:23 pm
by zoneminder
zoneminder wrote:Can you confirm that if you do

Code: Select all

mysql -u<your db user> -p<your db pass> <your db>
select * from Config where Name = "ZM_SHM_KEY";
quit;
that you get a row of data out?
Can you try this and post what you get?

Posted: Tue Jan 24, 2006 10:30 pm
by rl03
mysql> select * from Config where Name = "ZM_SHM_KEY";
+-----+------------+------------+-------------+--------------+-------------+-----------------------------------+-----------+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------+----------+
| Id | Name | Value | Type | DefaultValue | Hint | Pattern | Format | Prompt | Help | Category | Readonly | Requires |
+-----+------------+------------+-------------+--------------+-------------+-----------------------------------+-----------+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------+----------+
| 109 | ZM_SHM_KEY | 0x7a6d2000 | hexadecimal | 0x7a6d2000 | hexadecimal | (?-xism:^(?:0x)?([0-9a-f]{1,8})$) | "0x".$1 | Shared memory root key to use | ZoneMinder uses shared memory to speed up communication between modules. To identify the right area to use shared memory keys are used. This option controls what the base key is, each monitor will have it's Id or'ed with this to get the actual key used. You will not normally need to change this value unless it clashes with another instance of ZoneMinder on the same machine. | system | 0 | |
+-----+------------+------------+-------------+--------------+-------------+-----------------------------------+-----------+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------+----------+
1 row in set (0.00 sec)

Posted: Tue Jan 24, 2006 11:06 pm
by zoneminder
Thanks. Do you have a zm.conf in the current directory and if so is it the same as the installed one?

Posted: Tue Jan 24, 2006 11:13 pm
by rl03
There is no zm.conf in the current directory.

Posted: Wed Jan 25, 2006 6:42 am
by Vadim
I have the same problem when upgrading from 1.21.4

# zmupdate.pl –version=1.21.4
Bareword "ZM_SHM_KEY" not allowed while "strict subs" in use at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder/SharedMem.pm line 221.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm line 36.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm line 36.
Compilation failed in require at /usr/local/bin/zmupdate.pl line 48.
BEGIN failed--compilation aborted at /usr/local/bin/zmupdate.pl line 48.

Posted: Wed Jan 25, 2006 8:39 pm
by cordel
Check your zm.config and make sure that you have the same login info for the database in the new conf.
If you're cut and pasting from one to the other, be aware that the variable ZM_DB_SERVER is now ZM_DB_HOST.

If you filled out the configure line correctly ( same as your previous 1.21.4 build) and added the correct db login to the end on the configure line then it should be set to go.

I suspect that something is off with your zm.conf.

Corey

Posted: Wed Jan 25, 2006 9:53 pm
by rl03
/etc/zm.conf appears to be correct

Posted: Wed Jan 25, 2006 10:12 pm
by cordel
Check all your logs and make sure that access to the database is not being denied. I'm not sure yet how to check to see where zm thinks its zm.conf should be but you might look in /usr/local/etc and make sure that is not one there ( I think this is the default location if you don't specify in the configure).

Corey

Posted: Wed Jan 25, 2006 10:16 pm
by rl03
No db errors anywhere in logs, so it appears to be fine. Definitely nothing in /usr/local/etc

Posted: Thu Jan 26, 2006 12:21 am
by zoneminder
I'm a bit stumped then. I will have to come up with another test script to explore other possibilities.

Posted: Thu Jan 26, 2006 12:57 pm
by djsb
Hi,

I had the same problems.
Just runing zmfix and then zmupdate -f solved my problem.

cheers,

Posted: Thu Jan 26, 2006 4:56 pm
by rl03
zmfix completes successfully. zmupdate dies with the same error

Code: Select all

$ zmpkg.pl
Bareword "ZM_SHM_KEY" not allowed while "strict subs" in use at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder/SharedMem.pm line 221.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm line 36.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm line 36.
Compilation failed in require at /usr/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 45.

Posted: Mon Jan 30, 2006 11:38 am
by zoneminder
It might be useful if everyone wwho has this error can report their system details as per the first post on this thread. It might throw up something in common which will help to track down this problem.