Page 1 of 1

API problem fresh Arch

Posted: Tue Apr 19, 2016 7:31 pm
by raspine
I'm new to Zoneminder. For installation I followed the instructions at https://wiki.archlinux.org/index.php/ZoneMinder.
The web interface works perfectly and I got some monitors running nicely, but I'm having issues with the API:

When I try to access the API using curl method here: http://zoneminder.readthedocs.org/en/st ... l#overview
I get "object not found".

When I try ZmNinja app is says: "Login validated but API failed"

When I type the url in webbrowserI (http://localhost/zm/api) I get:

Warning: mkdir(): Permission denied in /srv/http/zoneminder/api/lib/Cake/Cache/Engine/FileEngine.php on line 380

Warning: _cake_core_ cache was unable to write 'cake_dev_sv' to File cache in /srv/http/zoneminder/api/lib/Cake/Cache/Cache.php on line 327

Warning: /srv/http/zoneminder/api/app/tmp/cache/persistent/ is not writable in /srv/http/zoneminder/api/lib/Cake/Cache/Engine/FileEngine.php on line 385

Fatal error: Uncaught CacheException: Cache engine "_cake_core_" is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct in /srv/http/zoneminder/api/lib/Cake/Cache/Cache.php:186 Stack trace: #0 /srv/http/zoneminder/api/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 /srv/http/zoneminder/api/app/Config/core.php(375): Cache::config('_cake_core_', Array) #2 /srv/http/zoneminder/api/lib/Cake/Core/Configure.php(72): include('/srv/http/zonem...') #3 /srv/http/zoneminder/api/lib/Cake/bootstrap.php(431): Configure::bootstrap(true) #4 /srv/http/zoneminder/api/app/webroot/index.php(94): include('/srv/http/zonem...') #5 /srv/http/zoneminder/api/index.php(41): require('/srv/http/zonem...') #6 {main} thrown in /srv/http/zoneminder/api/lib/Cake/Cache/Cache.php on line 186

Any help would be appreciated!

Re: API problem fresh Arch

Posted: Tue Apr 19, 2016 7:42 pm
by asker
try

Code: Select all

chown -R www-data:www-data /srv/http/zoneminder/api

Re: API problem fresh Arch

Posted: Wed Apr 20, 2016 7:56 pm
by raspine
Thanks it helped a little I think. Now I get (through access via web browser http://locahost/zm/api):
===
CakePHP: the rapid development php framework

Missing Database Connection

Error: A Database connection using "Mysql" was missing or unable to connect.
The database server returned this error: SQLSTATE[HY000] [1045] Access denied for user 'zmuser'@'localhost' (using password: YES)

Notice: If you want to customize this error message, create app/View/Errors/missing_connection.ctp
====
I can login to MySql via terminal with "zmuser" using the same password as set in /etc/zm.conf

Re: API problem fresh Arch

Posted: Sun Jul 24, 2016 11:29 pm
by misterandres
Hi, I am starting now and I got exactly the same situation. Were you able to find out what was the issue?
Thank you

Re: API problem fresh Arch

Posted: Mon Jul 25, 2016 12:14 am
by misterandres
I fixed it. Found int another thread that if you change the zmuser password after installation you have to updated Database.php inside the api/app/Config folder (installing from AUR repository version 1.29 )