Page 1 of 1

API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 5:52 pm
by prozach
Fresh install of v1.29.0 on ubuntu 14.04.1 LTS

I followed the easy install instructions for trusty.

All of my cameras are working, auth works.

API page is throwing weird results:
Image

I have tried following the instructions, but then I get the following:
Image

I am still searching for what the DB should have in it...

Re: API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 7:06 pm
by asker
There is no such class called ApiController - its not in the ZoneMinder code on github either.
Do this - go to /usr/share/zoneminder
then do

Code: Select all

find . | xargs fgrep ApiController 2>/dev/null
tell me what you see

Re: API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 8:09 pm
by prozach
And I should say fresh install of zoneminder.

Code: Select all

root@mineserver:/usr/share/zoneminder# find . | xargs fgrep ApiController 2>/dev/null
./www/api/app/Controller/ApiController.php:class ApiController extends AppController {
root@mineserver:/usr/share/zoneminder#
So its there, but only because I added it like the error message said.

With the file there I get missing database table errors, if I delete the file, of course nothing is found and I go back to having the missing controller error. I suspect this is a problem with cakephp and not with zoneminder exactly.

I am following the instructions here: http://zoneminder.readthedocs.org/en/la ... buntu-14-x

everything else seems to work just fine.

Re: API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 8:11 pm
by asker
which PHP version?

Re: API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 8:27 pm
by prozach
5.5.9+dfsg-lub

Re: API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 8:32 pm
by asker
So please don't add it - the error is ambiguous. The real reason is likely a misrouting

Please revert to original state, then please post a screenshot (including the URL you are going to) of the api page

There may also be an issue with your .htaccess files -and a misrouting. For example on my correctly configured system, instead of http://server/zm/api if I go to http://server/zm/api/api the same error for missing API controller shows. This can also happen if your htaccess routing is messed up

Re: API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 8:54 pm
by prozach
The first screenshot is what I get from a vanilla install of zoneminder.
as a troubleshooting step I added file at one point and got the second screenshot.
I have since then removed it and I am back to the original screenshot.

I am hosting zoneminder on a secondary system and I have my webserver proxying requests from the cname I built for zoneminder.

You mentioned /api/api/ and I saw that at onepoint but can't remember the scenario.
and now looking at the configs, I think I know where the issue is.

if I goto localhost/zm/api everything is happy.

So now I just need to figure out the confilct between the alias and my virtualhosting documentroot.

Re: API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 9:07 pm
by asker
You mentioned /api/api/ and I saw that at onepoint but can't remember the scenario.
and now looking at the configs, I think I know where the issue is.

if I goto panopticon.zachula.com/zm/api everything is happy.

So now I just need to figure out the confilct between the alias and my virtualhosting documentroot.
sounds good.

Re: API Problems, fresh install trusty

Posted: Tue Mar 29, 2016 9:44 pm
by prozach
Thanks for the help!

Re: API Problems, fresh install trusty

Posted: Wed Mar 30, 2016 1:03 am
by bbunge
These instructions may be more up to date:

https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

If you are having issues with the API you may need to:

chown -R www-data:www-data /usr/share/zoneminder/