Page 1 of 1

Bareword ZM_DYN_DB_VERSION not allowed while strict subs ...

Posted: Sun Jan 27, 2013 11:55 pm
by e_defranco
Hi to all.

After out of space (preparing data to send by email of ftp fullfill /tmp/zm on root fs system), I cannot run zm and get the error

Starting ZoneMinder: Bareword "ZM_DYN_DB_VERSION" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 150.

and other similar ....

looking on the forum I read very similar case where the solution was comparing the Config table of db with the original and replace the fields (maybe after 201) missing but I have not understand how to make this (sorry, I am new to database and zm).

Thank in advance,

emilio

Re: Bareword ZM_DYN_DB_VERSION not allowed while strict subs

Posted: Wed Jan 30, 2013 10:35 am
by e_defranco
Very difficult problem ... but I was expecting something more from this forum.

In any case .... SOLVED.

SOLUTION.

1) install myphpadmin to edit the database (login as root, why if you are not root you cannot edit nothing);
2) export the table config in a file config.sql;
3) open with your prefered text editor the file /usr/share/zoneminder/db/zm_create.sql;
4) save it as my_config_tmp.sql (or any other name you prefer);
5) identify the section "Apply the initial configuration" and copy the part of your interest (in my case, all row from id 202 to the end) in the config.sql that you have previously saved.

ATTENTION

The format of the dates in zm_create.sql is different of the exported config.sql.

You must re arrange it before apply !!!

Is no more simple but is more intuitive.

When you have done, from myphpadmin, empty (truncate) the config table and import in the empty table the file config.sql that you have edited.

After done, restart mysql and zoneminder ... all working fine.

Emilio