API not working

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
jslettengren
Posts: 1
Joined: Mon Apr 27, 2020 8:14 pm

API not working

Post by jslettengren »

Ubuntu 18.04, Zoneminder 1.34.9, PHP 7.4.5.

I'm having issues with accessing the API. (I want to use ZmNinja.)

When accessing https://url/zm/api/host/getversion.json

I get a blank page, http error 500 and the following in the Apache-log:

Code: Select all

[Mon Apr 27 22:09:28.508782 2020] [php7:warn] [pid 224766] [client 192.168.1.38:49710] PHP Warning:  include(/usr/share/zoneminder/www/api/lib/Cake/bootstrap.php): failed to open stream: No such file or directory in /usr/share/zoneminder/www/api/app/webroot/index.php on line 94
[Mon Apr 27 22:09:28.508868 2020] [php7:warn] [pid 224766] [client 192.168.1.38:49710] PHP Warning:  include(): Failed opening '/usr/share/zoneminder/www/api/lib/Cake/bootstrap.php' for inclusion (include_path='.:/usr/share/php') in /usr/share/zoneminder/www/api/app/webroot/index.php on line 94
[Mon Apr 27 22:09:28.508900 2020] [php7:error] [pid 224766] [client 192.168.1.38:49710] PHP Fatal error:  CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your /cake core directory and your /vendors root directory. in /usr/share/zoneminder/www/api/app/webroot/index.php on line 99
/usr/share/zoneminder/www/api/lib/Cake/ is empty.

I have found posts with the similar errors for earlier versions of Zoneminder, but none of the proposed solutions that I have seen work. (One was to add rewrite to apache2.conf. Other say check .htaccess - they look fine.)

Could anyone point me in the right direction for solving this?

(Side note: Notifications to zmninja work, so I get to see a still image of the alarm, but I cannot use zmninja to watch the whole recording.)
Post Reply