The problem appears to be that the new version has added configuration data. The script zmupdate.pl is supposed to update the configuration in the mysql Config table, but it fails to compile because it depends on a new configuration value, ZM_DYN_DB_VERSION, which has not been created yet.
I found a file /undef.log containing the error:
---
12/29/14 20:39:24.043538 undef[1400].ERR-zm_config.cpp/259 [Config mismatch, expected 215 items, read 202. Try running 'zmupdate.pl -f' to reload config.]
Attempting to run zmupdate.pl -f gives:
Bareword "ZM_DYN_DB_VERSION" not allowed while "strict subs" in use at /usr/bin/zmupdate.pl line 111.
BEGIN not safe after errors--compilation aborted at /usr/bin/zmupdate.pl line 149.
---
It seems there are some other new configuration values.
Workaround:
Use a script to update the Config stored in the database:
---
#!/usr/bin/perl -w
#
# Fix the ZoneMinder configuration table with data from ZoneMinder:ConfigData package
use strict;
use bytes;
use ZoneMinder::ConfigAdmin qw(:all);
loadConfigFromDB();
saveConfigToDB();
exit;
---
Running the script gave:
---
./zmfix.pl
Loading config from DB
No option 'ZM_LOCAL_BGR_INVERT' found, removing at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_Y_IMAGE_DELTAS' found, removing at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_BLEND_ALARMED_IMAGES' found, removing at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_V4L2_CAPTURE_FIELDS' found, removing at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 89.
Saving config to DB
---
Checking the database, there are now 215 rows in Config.
Trying the update script again:
---
zmupdate.pl -f
Freshening configuration in database
Loading config from DB
Saving config to DB
Previous versions of ZoneMinder used the MyISAM database engine.
However, the recommended database engine is InnoDB.
Hint: InnoDB tables are much less likely to be corrupted during an unclean shutdown.
Press 'y' to convert your tables to InnoDB or 'n' to skip : y
Converting MyISAM tables to InnoDB. Please wait.
---
The conversion has not finished yet, so I cannot confirm that this workaround works, but it does allow zmupdate.pl to run.
A proper fix would modify zmupdate.pl so that it is not dependant on configuration values that do not exist in old versions.
The problem appears to be that the new version has added configuration data. The script zmupdate.pl is supposed to update the configuration in the mysql Config table, but it fails to compile because it depends on a new configuration value, ZM_DYN_DB_VERSION, which has not been created yet. .ERR-zm_ config. cpp/259 [Config mismatch, expected 215 items, read 202. Try running 'zmupdate.pl -f' to reload config.] zmupdate. pl line 111. zmupdate. pl line 149. ConfigData package
I found a file /undef.log containing the error:
---
12/29/14 20:39:24.043538 undef[1400]
Attempting to run zmupdate.pl -f gives:
Bareword "ZM_DYN_DB_VERSION" not allowed while "strict subs" in use at /usr/bin/
BEGIN not safe after errors--compilation aborted at /usr/bin/
---
It seems there are some other new configuration values.
Workaround:
Use a script to update the Config stored in the database:
---
#!/usr/bin/perl -w
#
# Fix the ZoneMinder configuration table with data from ZoneMinder:
use strict;
use bytes;
use ZoneMinder: :ConfigAdmin qw(:all); BGR_INVERT' found, removing at /usr/share/ perl5/ZoneMinde r/ConfigAdmin. pm line 89. perl5/ZoneMinde r/ConfigAdmin. pm line 89. ALARMED_ IMAGES' found, removing at /usr/share/ perl5/ZoneMinde r/ConfigAdmin. pm line 89. CAPTURE_ FIELDS' found, removing at /usr/share/ perl5/ZoneMinde r/ConfigAdmin. pm line 89.
loadConfigFromDB();
saveConfigToDB();
exit;
---
Running the script gave:
---
./zmfix.pl
Loading config from DB
No option 'ZM_LOCAL_
No option 'ZM_Y_IMAGE_DELTAS' found, removing at /usr/share/
No option 'ZM_BLEND_
No option 'ZM_V4L2_
Saving config to DB
---
Checking the database, there are now 215 rows in Config.
Trying the update script again:
---
zmupdate.pl -f
Freshening configuration in database
Loading config from DB
Saving config to DB
Previous versions of ZoneMinder used the MyISAM database engine.
However, the recommended database engine is InnoDB.
Hint: InnoDB tables are much less likely to be corrupted during an unclean shutdown.
Press 'y' to convert your tables to InnoDB or 'n' to skip : y
Converting MyISAM tables to InnoDB. Please wait.
---
The conversion has not finished yet, so I cannot confirm that this workaround works, but it does allow zmupdate.pl to run.
A proper fix would modify zmupdate.pl so that it is not dependant on configuration values that do not exist in old versions.