Page 1 of 1
zmNinja "Login validated but API failed"
Posted: Mon May 02, 2016 5:06 pm
by AbbaTheHorse
Hi there
I'm brand new to Linux and therefore ZoneMinder, but got it installed under a brand new Debian install today.
All works well, but I'm having trouble getting zmNinja setup. I add the URL to ZM in the settings screen and it appends the default parts for cgi-bin and api, but it fails when I save with:
"Login validated but API failed"
I know my base ZM url is correct as it works in a browser when I copy and paste it.
Am I missing something really obvious?
Re: zmNinja "Login validated but API failed"
Posted: Mon May 02, 2016 10:29 pm
by asker
Before you try zmNinja, make sure your zoneminder APIs are working
https://github.com/pliablepixels/zmNinj ... -apis-work
Re: zmNinja "Login validated but API failed"
Posted: Tue May 03, 2016 10:29 am
by AbbaTheHorse
Thanks for the reply, it would seem that my APIs aren't working, as when I try to access the path I get:
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(376): 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
I didn't deviate from the easy install guide but I've obviously missed something. Is it easy to see what I may have done wrong/missed?
Thanks so much again.
Re: zmNinja "Login validated but API failed"
Posted: Tue May 03, 2016 5:13 pm
by asker
Try
Code: Select all
chown -R www-data:www-data /usr/share/zoneminder/www/api/
Re: zmNinja "Login validated but API failed"
Posted: Sun Jul 10, 2016 11:11 am
by trapper1974
I had exactly the same issue as AbbaTheHorse and have resolved it using asker's permissions change instruction.
This also resolved the issue I had with zmNinja - the iOS app was displaying a greyscreen with the message "authenticating". I knew it was api related but I too am new to linux and hadn't worked out the fix myself yet.
Heartfelt thanks to you both!