API Not Working
Posted: Fri Mar 13, 2020 8:14 pm
Ive moved to a new NAS. I used to have Ubuntu with ZM 1.34 and the API worked fine. Now in ZMNinja the API fails.
It says ZMController.php not found but ZmController.php doesnt exist and didnt exist in the working config either.
I found a similar post here: https://github.com/pliablepixels/zmNinja/issues/300
Here is the output from the page
CakePHP: the rapid development php framework
Missing Controller
Error: ZmController could not be found.
Error: Create the class ZmController below in file: app/Controller/ZmController.php
<?php
class ZmController extends AppController {
}
Notice: If you want to customize this error message, create app/View/Errors/missing_controller.ctp
Stack Trace
APP/webroot/index.php line 107 → Dispatcher->dispatch(CakeRequest, CakeResponse)
CakePHP: the rapid development php framework
CakePHP 2.10.8
root@zoneminder:/usr/local/www/zoneminder/api/app/Controller # ls -la
total 129
drwxr-xr-x 3 www www 19 Mar 11 13:26 .
drwxr-xr-x 11 www www 12 Mar 13 11:44 ..
-rw-r--r-- 1 www www 3694 Dec 8 2018 AppController.php
drwxr-xr-x 2 www www 6 Mar 11 13:26 Component
-rw-r--r-- 1 www www 3270 Dec 8 2018 ConfigsController.php
-rw-r--r-- 1 www www 1353 Dec 8 2018 ControlsController.php
-rw-r--r-- 1 www www 12162 Dec 8 2018 EventsController.php
-rw-r--r-- 1 www www 2516 Dec 8 2018 FramesController.php
-rw-r--r-- 1 www www 3472 Dec 8 2018 GroupsController.php
-rw-r--r-- 1 www www 5584 Dec 8 2018 HostController.php
-rw-r--r-- 1 www www 2383 Dec 8 2018 LogsController.php
-rw-r--r-- 1 www www 11289 Dec 8 2018 MonitorsController.php
-rw-r--r-- 1 www www 2123 Dec 8 2018 PagesController.php
-rw-r--r-- 1 www www 3697 Dec 8 2018 ServersController.php
-rw-r--r-- 1 www www 3646 Dec 8 2018 StatesController.php
-rw-r--r-- 1 www www 3776 Dec 8 2018 StorageController.php
-rw-r--r-- 1 www www 3777 Dec 8 2018 UsersController.php
-rw-r--r-- 1 www www 2654 Dec 8 2018 ZonePresetsController.php
-rw-r--r-- 1 www www 4608 Dec 8 2018 ZonesController.php
Im running 1.32.3 in a Freenas 11.3 jail built as a plugin.
Everything else works just no API.
I followed the guide here and fixed the errors regarding the logs and disabled the rewrites
viewtopic.php?t=28189
It says ZMController.php not found but ZmController.php doesnt exist and didnt exist in the working config either.
I found a similar post here: https://github.com/pliablepixels/zmNinja/issues/300
Here is the output from the page
CakePHP: the rapid development php framework
Missing Controller
Error: ZmController could not be found.
Error: Create the class ZmController below in file: app/Controller/ZmController.php
<?php
class ZmController extends AppController {
}
Notice: If you want to customize this error message, create app/View/Errors/missing_controller.ctp
Stack Trace
APP/webroot/index.php line 107 → Dispatcher->dispatch(CakeRequest, CakeResponse)
CakePHP: the rapid development php framework
CakePHP 2.10.8
root@zoneminder:/usr/local/www/zoneminder/api/app/Controller # ls -la
total 129
drwxr-xr-x 3 www www 19 Mar 11 13:26 .
drwxr-xr-x 11 www www 12 Mar 13 11:44 ..
-rw-r--r-- 1 www www 3694 Dec 8 2018 AppController.php
drwxr-xr-x 2 www www 6 Mar 11 13:26 Component
-rw-r--r-- 1 www www 3270 Dec 8 2018 ConfigsController.php
-rw-r--r-- 1 www www 1353 Dec 8 2018 ControlsController.php
-rw-r--r-- 1 www www 12162 Dec 8 2018 EventsController.php
-rw-r--r-- 1 www www 2516 Dec 8 2018 FramesController.php
-rw-r--r-- 1 www www 3472 Dec 8 2018 GroupsController.php
-rw-r--r-- 1 www www 5584 Dec 8 2018 HostController.php
-rw-r--r-- 1 www www 2383 Dec 8 2018 LogsController.php
-rw-r--r-- 1 www www 11289 Dec 8 2018 MonitorsController.php
-rw-r--r-- 1 www www 2123 Dec 8 2018 PagesController.php
-rw-r--r-- 1 www www 3697 Dec 8 2018 ServersController.php
-rw-r--r-- 1 www www 3646 Dec 8 2018 StatesController.php
-rw-r--r-- 1 www www 3776 Dec 8 2018 StorageController.php
-rw-r--r-- 1 www www 3777 Dec 8 2018 UsersController.php
-rw-r--r-- 1 www www 2654 Dec 8 2018 ZonePresetsController.php
-rw-r--r-- 1 www www 4608 Dec 8 2018 ZonesController.php
Im running 1.32.3 in a Freenas 11.3 jail built as a plugin.
Everything else works just no API.
I followed the guide here and fixed the errors regarding the logs and disabled the rewrites
viewtopic.php?t=28189