API Problems, fresh install trusty

Forum for questions and support relating to the 1.29.x releases only.
Locked
User avatar
prozach
Posts: 6
Joined: Tue Mar 29, 2016 5:19 am

API Problems, fresh install trusty

Post 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...
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: API Problems, fresh install trusty

Post 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
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
User avatar
prozach
Posts: 6
Joined: Tue Mar 29, 2016 5:19 am

Re: API Problems, fresh install trusty

Post 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.
Last edited by prozach on Tue Mar 29, 2016 8:19 pm, edited 1 time in total.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: API Problems, fresh install trusty

Post by asker »

which PHP version?
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
User avatar
prozach
Posts: 6
Joined: Tue Mar 29, 2016 5:19 am

Re: API Problems, fresh install trusty

Post by prozach »

5.5.9+dfsg-lub
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: API Problems, fresh install trusty

Post 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
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
User avatar
prozach
Posts: 6
Joined: Tue Mar 29, 2016 5:19 am

Re: API Problems, fresh install trusty

Post 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.
Last edited by prozach on Tue Mar 29, 2016 9:45 pm, edited 1 time in total.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: API Problems, fresh install trusty

Post 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.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
User avatar
prozach
Posts: 6
Joined: Tue Mar 29, 2016 5:19 am

Re: API Problems, fresh install trusty

Post by prozach »

Thanks for the help!
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: API Problems, fresh install trusty

Post 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/
Locked