wep_php

Previous development branch now released as 1.36
Locked
dougmccrary
Posts: 1214
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

wep_php

Post 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.
dougmccrary
Posts: 1214
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: wep_php

Post by dougmccrary »

That's on ubuntu 18.04, in case it matters.
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: wep_php

Post by iconnor »

fixed in latest master
dougmccrary
Posts: 1214
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: wep_php

Post 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.
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: wep_php

Post by iconnor »

The fix is going to be harder than I thought.
dougmccrary
Posts: 1214
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: wep_php

Post by dougmccrary »

Bummer. Sorry.
dougmccrary
Posts: 1214
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: wep_php

Post by dougmccrary »

:D You fixed it. :mrgreen:
simonspt
Posts: 3
Joined: Mon Jun 22, 2020 10:06 am

Re: wep_php

Post 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)
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: wep_php

Post by iconnor »

1.35.3 is old. Update.
simonspt
Posts: 3
Joined: Mon Jun 22, 2020 10:06 am

Re: wep_php

Post 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/
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: wep_php

Post by iconnor »

Apparently compile was failing on stretch. Fixed. repo now has 1.35.5.
simonspt
Posts: 3
Joined: Mon Jun 22, 2020 10:06 am

Re: wep_php

Post by simonspt »

Ok thanks. Now seems fixed. :wink:
Locked