I stopped ZM to move the events and images directories to a RAID so as not to fill the boot drive. (I did this by doing 'cp -Rp /var/lib/zoneminder/* /video', 'mv /var/lib/zoneminder /var/lib/zoneminder.o', and 'ln -s /video /var/lib/zoneminder'.) This created a symbolic link to the RAID, such that anything written to /var/lib/zoneminder would end up on the dedicated 2TB file system and I didn't have to muck around in the ZM/apache configs to get things working. However, ZM refused to start after this. After putting everything back the way it was ('rm /var/lib/zoneminder', 'mv /var/lib/zoneminder.o /var/lib/zoneminder'), ZM still won't start. Instead, I get the following when executing 'service zoneminder start':
Code: Select all
Bareword "ZM_DYN_DB_VERSION" not allowed while "strict subs" in use at /usr/bin/zmupdate.pl line 116.
BEGIN not safe after errors--compilation aborted at /usr/bin/zmupdate.pl line 154.
Line 116 is the end of an if statement that begins:
if ( ZM_DYN_DB_VERSION )
Looking at /etc/init.d/zoneminder, I found it was running '/usr/bin/zmupdate.pl -f' before starting ZM itself. If I enter this command manually, it produces the same error. OK, so I'll just bypass it - no big deal, just comment out the line calling the function which executes zmupdate.pl. Unfortunately, several similar errors then crop up in /usr/bin/zmpkg.pl all related to ZM_DYN_DB_VERSION.
The thing that really puzzles me is that it started fine the first time, now refuses to run. I'm going to delve into the perl code shortly, but am hoping somebody has a suggestion. (I did find a similar problem was reported here a few weeks ago, but there are no responses/solutions in that post.) ZM_DYN_DB_VERSION looks like a constant in the coding style I use, but I don't know if this is true in ZM or not. If true, I don't understand why it's being used in an if statement alone or why perl is complaining about it. I also still can't wrap my head around ZM starting fine the first time and not the second, even though everything is back the way it was, file ownership/permissions intact.