SQL Errors when trying to generate video

Forum for questions and support relating to the 1.24.x releases only.
Post Reply
Posts: 1
Joined: Tue Nov 15, 2011 5:20 pm

SQL Errors when trying to generate video

Post by piku » Tue Nov 15, 2011 5:51 pm

I've got ZoneMinder 1.24.2 installed on my Ubuntu machine, capturing video from a cheapo Chinese PTZ IP camera.

All the motion detection, event playback and image capture works fine but I can't make it export anything.

If I click on an event I can play it back, rewind it and pause it using the Java applet (although the progress meter scrubber doesn't work) but if I then click on 'Export' and choose any of the options (Export Event Details, Frame Details, Image files, etc) and press the 'Export' button I just get a message saying "Export Failed".

If I click on the 'Video' link I get a message like this:
An error has occurred and this operation cannot continue.
For full details check your web logs for the code 'F37307'
If I then look in my Apache logfiles I see this:

Code: Select all

[Tue Nov 15 17:42:08 2011] [error] [client] No event id(s) supplied, referer: <my machine>/zm/index.php?view=export&eid=undefined
[Tue Nov 15 17:42:08 2011] [error] [client] array (\n  0 => \n  array (\n    'file' => '/usr/share/zoneminder/ajax/event.php',\n    'line' => 5,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'No event id(s) supplied',\n    ),\n  ),\n  1 => \n  array (\n    'file' => '/usr/share/zoneminder/index.php',\n    'line' => 116,\n    'args' => \n    array (\n      0 => '/usr/share/zoneminder/ajax/event.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: <my machine>/zm/index.php?view=export&eid=undefined
[Tue Nov 15 17:42:28 2011] [error] [client] SQL-ERROR(F37307): select E.*,M.Name as MonitorName,M.Width,M.Height,M.DefaultRate,M.DefaultScale from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.Id = undefined, referer: <my machine>/zm/index.php?view=event&eid=13624&filter[terms][0][attr]=MonitorId&filter[terms][0][op]=%3D&filter[terms][0][val]=1&sort_field=StartTime&sort_asc=1&page=1
[Tue Nov 15 17:42:28 2011] [error] [client] SQL-ERROR(F37307): Unknown column 'undefined' in 'where clause', referer: <my machine>/zm/index.php?view=event&eid=13624&filter[terms][0][attr]=MonitorId&filter[terms][0][op]=%3D&filter[terms][0][val]=1&sort_field=StartTime&sort_asc=1&page=1
Now, looking at the URL in the error message's window, it's not passing an event ID through. If I paste the link into a new browser tab and replace 'undefined' with a valid event ID I can create a (rather blocky and low res) video file that plays in VLC, etc.

The 'video' link on the top of the event window looks like this:

Code: Select all

<my machine>/zm/index.php?view=event&eid=13624&filter[terms][0][attr]=MonitorId&filter[terms][0][op]=%3D&filter[terms][0][val]=1&sort_field=StartTime&sort_asc=1&page=1#
Is there something vital I forgot to do when installing ZM? I used the Ubuntu package that gets installed when I type 'apt-get install zoneminder'. I'm a programmer and have written PHP & MySQL stuff before so I'm quite happy to try things out and provide more detailed information if it helps.

Posts: 21
Joined: Sat Nov 05, 2011 11:03 pm

Re: SQL Errors when trying to generate video

Post by TylerSchwend » Wed Nov 23, 2011 6:21 am

I am experiencing this same problem. Everything works in other windows, but none of the actions really work in the event view. Did use DEB package as well. The initial click of the "export" button from the event takes you to:


It looks like everything in /usr/share/zoneminder/skins/classic/views/js/event.js that includes "eventData.Id" fails to actually get that variable. Export, event detail, frames, stat... all of that just doesn't work because the event ID isn't getting passed.

Manually passing the event ID does seem to do the trick.

Also, while trying to narrow down where the problem was by plopping "alert(eventData.Id);" around the various javascript files... Somehow, even after removing those lines, things are working properly. I restarted ZoneMinder and apache... and everything is still working right. WTF.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests