zmaudit SQL error

Forum for questions and support relating to the 1.26.x releases only.
Locked
syntrax
Posts: 1
Joined: Sun Aug 03, 2014 11:45 am

zmaudit SQL error

Post by syntrax »

I am encountering an error in the execution of the zmaudit script. The screenshot below describes the error sequence in the system log.
zm_audit_error.png
zm_audit_error.png (21.64 KiB) Viewed 38069 times
I am running zoneminder on a VBox virtual machine, ubuntu 14.04, zm version 1.26.5 via the iconnor ppa.
Basic initial setup. Three IP cameras connected. D-Link 932L and 933L.
/var/cache/... bind mounted to separate data disk. No issues.
Capturing appears to work just fine.
Other than a test to verify the working of the bind mount, no recording or motion detection configured. (Recording to the bind mount works just fine.)
No other apparent problems encountered.
Unchecking OPT_FAST_DELETE in the system options tab does not affect the error for the better.

Since the error mentions 'hours' on line 1 in the sql code, is it possible that his error is related to ntp/system time settings?

Please help.

For those who do not get to see the screenshot above, the following is the main line involved:

==begin==
Comment: zmaudit
PID: 24065
Level: FAT
Message: Can't execute: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'hours)' at line 1
File: zmaudit.pl
==end==

Thank you.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmaudit SQL error

Post by knight-of-ni »

While it might be possible to read through the forums and track down all the php related issues with running newer Ubuntu's on zoneminder, the best advice I can give you is to read the note stated on iconnor's PPA under the section at the top labeled "PPA description".

https://launchpad.net/~iconnor/+archive ... zoneminder
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
6i6i
Posts: 9
Joined: Mon Jan 11, 2016 8:55 am

Re: zmaudit SQL error

Post by 6i6i »

I had the same error too. It was a configuration problem of zoneminder. zmaudit.pl is deleting log entrys out of the zoneminder internal LOG table. I set the value of the zoneminder option Logging -> LOG_DATABASE_LIMIT from "2 hours" to "2 hour".
This is also specified like this in the help text.

If this does not solve the problem, it is possible that you can find it out if you execute sudo zmaudit.pl at the commandline and see at which line of zmaudit.pl the mysql errror happens.

BR
Locked