Page 1 of 1

wep_php

Posted: Mon May 11, 2020 1:57 am
by dougmccrary
When clicking on live image in montage mode, the live image comes up, but there are no recent events.

2020-05-10 18:50:58 web_php 3129 ERR Sort field Id not in SQL Fields /usr/share/zoneminder/www/ajax/status.php 291
2020-05-10 18:50:58 web_php 3129 ERR SQL-ERR 'SQLSTATE[42000]: Syntax error or access violation: 1064 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 'DESC limit 20' at line 1', statement was 'SELECT `Id`, `MonitorId`, `Name`, `Cause`, `Notes`, `StartTime`, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, `EndTime`, `Width`, `Height`, `Length`, `Frames`, `AlarmFrames`, `TotScore`, `AvgScore`, `MaxScore` FROM Events WHERE Events.MonitorId = :selector0 ORDER BY DESC limit 20' params:1 /usr/share/zoneminder/www/includes/database.php 152
2020-05-10 18:50:58 web_php 3129 ERR SQL-ERR dbFetchAll no result, statement was 'SELECT `Id`, `MonitorId`, `Name`, `Cause`, `Notes`, `StartTime`, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, `EndTime`, `Width`, `Height`, `Length`, `Frames`, `AlarmFrames`, `TotScore`, `AvgScore`, `MaxScore` FROM Events WHERE Events.MonitorId = :selector0 ORDER BY DESC limit 20'params: 1 /usr/share/zoneminder/www/includes/database.php 185

It works as expected in the latest release 1.34, but current 1.35 breaks it. I think the one a week ago also breaks it.
When I installed 1.35, it said the db was updated successfully.

Re: wep_php

Posted: Mon May 11, 2020 2:23 am
by dougmccrary
That's on ubuntu 18.04, in case it matters.

Re: wep_php

Posted: Mon May 11, 2020 1:59 pm
by iconnor
fixed in latest master

Re: wep_php

Posted: Wed May 13, 2020 12:34 am
by dougmccrary
Isaac -
The the error report is gone, but there is no list of recent events, either...just the column names.
I initially had the looping refresh mentioned elsewhere, and a new install fixed that.
Installed the easy way script for ubuntu 18.04, except changed the ppa to master, so no update.
From the morning 5-11 snapshot.

Re: wep_php

Posted: Wed May 13, 2020 12:35 am
by iconnor
The fix is going to be harder than I thought.

Re: wep_php

Posted: Wed May 13, 2020 6:25 am
by dougmccrary
Bummer. Sorry.

Re: wep_php

Posted: Wed May 13, 2020 8:41 pm
by dougmccrary
:D You fixed it. :mrgreen:

Re: wep_php

Posted: Mon Jun 22, 2020 10:25 am
by simonspt
Hello!
I'm running Debian Stretch 9 con a 64bit system
I've just installed zoneminder latest version 1.35.3~20200509.27-stretch (amd64) and seems that this problem is still here.
I can reproduce the exact issue by forcing an alarm on a monitor.
This is the complete listing:

Code: Select all

2020-06-22 12:15:01	web_php		8128	ERR	Sort field Id not in SQL Fields	/usr/share/zoneminder/www/ajax/status.php	291

Code: Select all

2020-06-22 12:15:01	web_php		8128	ERR	SQL-ERR 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DESC limit 20' at line 1', statement was 'SELECT `Id`, `MonitorId`, `Name`, `Cause`, `Notes`, `StartTime`, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, `EndTime`, `Width`, `Height`, `Length`, `Frames`, `AlarmFrames`, `TotScore`, `AvgScore`, `MaxScore` FROM Events WHERE Events.MonitorId = :selector0 ORDER BY DESC limit 20' params:1	/usr/share/zoneminder/www/includes/database.php	152

Code: Select all

2020-06-22 12:15:01	web_php		8128	ERR	SQL-ERR dbFetchAll no result, statement was 'SELECT `Id`, `MonitorId`, `Name`, `Cause`, `Notes`, `StartTime`, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, `EndTime`, `Width`, `Height`, `Length`, `Frames`, `AlarmFrames`, `TotScore`, `AvgScore`, `MaxScore` FROM Events WHERE Events.MonitorId = :selector0 ORDER BY DESC limit 20'params: 1	/usr/share/zoneminder/www/includes/database.php	185
Just for test I've added a simple monitor (monitor mode) of type "File" that points to a jpg on the local system.

I've noticed that the same issue as @dougmccrary (clicking on live image in montage mode)

Re: wep_php

Posted: Mon Jun 22, 2020 1:14 pm
by iconnor
1.35.3 is old. Update.

Re: wep_php

Posted: Tue Jun 23, 2020 1:33 pm
by simonspt
According to the zmrepo, on Debian Stretch this seems to be the last version for amd64 .. it there a newer version that's not listed there??
This is the repo I'm using.
https://zmrepo.zoneminder.com/debian/master/stretch/

Re: wep_php

Posted: Tue Jun 23, 2020 7:03 pm
by iconnor
Apparently compile was failing on stretch. Fixed. repo now has 1.35.5.

Re: wep_php

Posted: Wed Jun 24, 2020 8:27 am
by simonspt
Ok thanks. Now seems fixed. :wink: