zmaudit SQL error

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

zmaudit SQL error

Post by syntrax » Sun Aug 03, 2014 12:15 pm

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 (21.64 KiB) Viewed 2652 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:

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

Thank you.

User avatar
Posts: 2226
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmaudit SQL error

Post by knight-of-ni » Fri Aug 15, 2014 3:08 pm

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". ... 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

Posts: 5
Joined: Mon Jan 11, 2016 8:55 am

Re: zmaudit SQL error

Post by 6i6i » Wed Feb 24, 2016 3:43 pm

I had the same error too. It was a configuration problem of zoneminder. 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 at the commandline and see at which line of the mysql errror happens.


Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests