Page 1 of 1

1.28.104 API not working

Posted: Fri Sep 25, 2015 11:54 pm
by lvthunder
I want to run the beta of zmninja so I need the API to work. I have two zm servers. One is running Ubuntu 14 and the other 15. When I go to http://localhost/zm/api/host/getVersion.json I get a file not found. When I go to http://localhost/zm/api I get this error on both of them.

Code: Select all

Warning: mkdir(): Permission denied in /usr/share/zoneminder/www/api/lib/Cake/Cache/Engine/FileEngine.php on line 379

Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /usr/share/zoneminder/www/api/lib/Cake/Cache/Cache.php on line 323

Warning: /usr/share/zoneminder/www/api/app/tmp/cache/persistent/ is not writable in /usr/share/zoneminder/www/api/lib/Cake/Cache/Engine/FileEngine.php on line 384

Fatal error: Uncaught exception 'CacheException' with message 'Cache engine _cake_core_ is not properly configured.' in /usr/share/zoneminder/www/api/lib/Cake/Cache/Cache.php:181 Stack trace: #0 /usr/share/zoneminder/www/api/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 /usr/share/zoneminder/www/api/app/Config/core.php(375): Cache::config('_cake_core_', Array) #2 /usr/share/zoneminder/www/api/lib/Cake/Core/Configure.php(72): include('/usr/share/zone...') #3 /usr/share/zoneminder/www/api/lib/Cake/bootstrap.php(175): Configure::bootstrap(true) #4 /usr/share/zoneminder/www/api/app/webroot/index.php(94): include('/usr/share/zone...') #5 /usr/share/zoneminder/www/api/index.php(41): require('/usr/share/zone...') #6 {main} thrown in /usr/share/zoneminder/www/api/lib/Cake/Cache/Cache.php on line 181

Re: 1.28.104 API not working

Posted: Fri Sep 25, 2015 11:56 pm
by bbunge
Check a week or so back in this forum. I have provided a procedure to get the API to work.

bb

Re: 1.28.104 API not working

Posted: Sat Sep 26, 2015 12:05 am
by bbunge

Re: 1.28.104 API not working

Posted: Sat Sep 26, 2015 1:52 pm
by knight-of-ni
You didn't state how you came to get the development snapshot zoneminder 1.28.104 installed on your system.
We are up to 1.28.106 now and we've made changes since the version you are running, which should make the API work out of the box (if you are running a packaged version of zoneminder).

You should upgrade to 1.28.106 if it is available.


On a side note, we've created a new forum specifically for the mobile app:
http://www.zoneminder.com/forums/viewforum.php?f=33

But I don't know if Kyle has got the permissions set up right. I need someone with a normal user account to try and post in there.

Re: 1.28.104 API not working

Posted: Sat Sep 26, 2015 2:34 pm
by asker
knnniggett wrote:
On a side note, we've created a new forum specifically for the mobile app:
http://www.zoneminder.com/forums/viewforum.php?f=33

But I don't know if Kyle has got the permissions set up right. I need someone with a normal user account to try and post in there.
It doesn't work knnniggett. I can't view that forum, let alone post. Screenshot attached:

Image

Re: 1.28.104 API not working

Posted: Sat Sep 26, 2015 6:27 pm
by bbunge
The PPA-Master for Ubuntu 14.04 is still at 1.28.104

Re: 1.28.104 API not working

Posted: Sun Sep 27, 2015 1:54 am
by lvthunder
Yes that is how I got it.

On another note thanks bbunge I got the API working on both of them.