ZM 1.30.4 API issue on ubuntu 17.10
Re: ZM 1.30.4 API issue on ubuntu 17.10
I did a 17.10 Ubuntu with ZM 1.30.4 install from the wiki instructions the other day and everything worked!
-
- Posts: 4
- Joined: Mon Apr 24, 2017 1:46 am
Re: ZM 1.30.4 API issue on ubuntu 17.10
After initially getting this issue on 17.04 I managed to get everything working, but I've just upgraded to 17.10, and this issue is back. I can't for the life of me remember how I solved it last time...
Apache log contains:
Apache log contains:
Code: Select all
[Tue Feb 06 20:37:47.104293 2018] [:error] [pid 15773] [client 192.168.0.22:61793] PHP Fatal error: Uncaught Error: Call to undefined function apc_fetch() in /usr/share/php/Cake/Cache/Engine/ApcEngine.php:91\nStack trace:\n#0 /usr/share/php/Cake/Cache/Cache.php(363): ApcEngine->read('myapp_cake_core...')\n#1 /usr/share/php/Cake/I18n/I18n.php(235): Cache::read('cake_dev_en-gb', '_cake_core_')\n#2 /usr/share/php/Cake/basics.php(636): I18n::translate('Cache engine "%...', NULL, 'cake_dev')\n#3 /usr/share/php/Cake/Cache/Cache.php(184): __d('cake_dev', 'Cache engine "%...', '_cake_core_')\n#4 /usr/share/php/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_')\n#5 /etc/zm/core.php(375): Cache::config('_cake_core_', Array)\n#6 /usr/share/php/Cake/Core/Configure.php(72): include('/etc/zm/core.ph...')\n#7 /usr/share/php/Cake/bootstrap.php(431): Configure::bootstrap(true)\n#8 /usr/share/zoneminder/www/api/app/webroot/index.php(90): include('/usr/share/php/...')\n#9 {main}\n thrown in /usr/share/php/Cake/Cache/Engine/ApcEngine.php on line 91
Re: ZM 1.30.4 API issue on ubuntu 17.10
Hi!Pyrotechnic wrote: ↑Tue Feb 06, 2018 8:39 pm After initially getting this issue on 17.04 I managed to get everything working, but I've just upgraded to 17.10, and this issue is back. I can't for the life of me remember how I solved it last time...
Apache log contains:
Code: Select all
[Tue Feb 06 20:37:47.104293 2018] [:error] [pid 15773] [client 192.168.0.22:61793] PHP Fatal error: Uncaught Error: Call to undefined function apc_fetch() in /usr/share/php/Cake/Cache/Engine/ApcEngine.php:91\nStack trace:\n#0 /usr/share/php/Cake/Cache/Cache.php(363): ApcEngine->read('myapp_cake_core...')\n#1 /usr/share/php/Cake/I18n/I18n.php(235): Cache::read('cake_dev_en-gb', '_cake_core_')\n#2 /usr/share/php/Cake/basics.php(636): I18n::translate('Cache engine "%...', NULL, 'cake_dev')\n#3 /usr/share/php/Cake/Cache/Cache.php(184): __d('cake_dev', 'Cache engine "%...', '_cake_core_')\n#4 /usr/share/php/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_')\n#5 /etc/zm/core.php(375): Cache::config('_cake_core_', Array)\n#6 /usr/share/php/Cake/Core/Configure.php(72): include('/etc/zm/core.ph...')\n#7 /usr/share/php/Cake/bootstrap.php(431): Configure::bootstrap(true)\n#8 /usr/share/zoneminder/www/api/app/webroot/index.php(90): include('/usr/share/php/...')\n#9 {main}\n thrown in /usr/share/php/Cake/Cache/Engine/ApcEngine.php on line 91
I had the same issue, because php-apcu and php-apcu-bc were missing. If Ubuntu has packages like php7.0-apcu and php7.0-apcu-bc, you might want to use them instead.
After installation, you need to reload apache.
Now I'm stuck with:
Code: Select all
PHP Fatal error: Uncaught InternalErrorException: Internal Server Error in /usr/share/php/Cake/Error/ErrorHandler.php:276\nStack trace:\n#0 /usr/share/php/Cake/Error/ErrorHandler.php(213): ErrorHandler::handleFatalError(256, '[MissingPluginE...', '/usr/share/php/...', 138)\n#1 [internal function]: ErrorHandler::handleError(256, '[MissingPluginE...', '/usr/share/php/...', 138, Array)\n#2 /usr/share/php/Cake/Error/ErrorHandler.php(138): trigger_error('[MissingPluginE...', 256)\n#3 [internal function]: ErrorHandler::handleException(Object(MissingPluginException))\n#4 {main}\n thrown in /usr/share/php/Cake/Error/ErrorHandler.php on line 276
Re: ZM 1.30.4 API issue on ubuntu 17.10
Fixed the API on my tinkerboard installation.
My last problem was:
As mentioned by bbunge the api/app/Plugin folder might be missing. This was also the case for my installation.
Therefore I checked github and found that it contains a folder "Crud", which contains https://github.com/FriendsOfCake/crud/t ... c3984eeed5. Since this version of Crud has not been edited since years, I simple copied it to my zoneminder installation and it worked (depending on your installation, you might need to adapt the folder/file rights).
Steps:
My last problem was:
Code: Select all
PHP Fatal error: Uncaught InternalErrorException: Internal Server Error in /usr/share/php/Cake/Error/ErrorHandler.php:276\nStack trace:\n#0 /usr/share/php/Cake/Error/ErrorHandler.php(213): ErrorHandler::handleFatalError(256, '[MissingPluginE...', '/usr/share/php/...', 138)\n#1 [internal function]: ErrorHandler::handleError(256, '[MissingPluginE...', '/usr/share/php/...', 138, Array)\n#2 /usr/share/php/Cake/Error/ErrorHandler.php(138): trigger_error('[MissingPluginE...', 256)\n#3 [internal function]: ErrorHandler::handleException(Object(MissingPluginException))\n#4 {main}\n thrown in /usr/share/php/Cake/Error/ErrorHandler.php on line 276
Therefore I checked github and found that it contains a folder "Crud", which contains https://github.com/FriendsOfCake/crud/t ... c3984eeed5. Since this version of Crud has not been edited since years, I simple copied it to my zoneminder installation and it worked (depending on your installation, you might need to adapt the folder/file rights).
Steps:
Code: Select all
mkdir -p /usr/share/zoneminder/www/api/app/Plugin/Crud/
cd /tmp
wget https://github.com/FriendsOfCake/crud/archive/c3976f1478c681b0bbc132ec3a3e82c3984eeed5.zip
unzip c3976f1478c681b0bbc132ec3a3e82c3984eeed5.zip
cp -r ./crud-c3976f1478c681b0bbc132ec3a3e82c3984eeed5/* /usr/share/zoneminder/www/api/app/Plugin/Crud/
-
- Posts: 4
- Joined: Mon Apr 24, 2017 1:46 am
Re: ZM 1.30.4 API issue on ubuntu 17.10
Nope, looks like there's no official apc for php7.0. I've tried installing it via no-idea what methods I found online, but still getting the same error :/mic07 wrote: ↑Tue Feb 06, 2018 9:16 pmHi!Pyrotechnic wrote: ↑Tue Feb 06, 2018 8:39 pm After initially getting this issue on 17.04 I managed to get everything working, but I've just upgraded to 17.10, and this issue is back. I can't for the life of me remember how I solved it last time...
Apache log contains:
Code: Select all
[Tue Feb 06 20:37:47.104293 2018] [:error] [pid 15773] [client 192.168.0.22:61793] PHP Fatal error: Uncaught Error: Call to undefined function apc_fetch() in /usr/share/php/Cake/Cache/Engine/ApcEngine.php:91\nStack trace:\n#0 /usr/share/php/Cake/Cache/Cache.php(363): ApcEngine->read('myapp_cake_core...')\n#1 /usr/share/php/Cake/I18n/I18n.php(235): Cache::read('cake_dev_en-gb', '_cake_core_')\n#2 /usr/share/php/Cake/basics.php(636): I18n::translate('Cache engine "%...', NULL, 'cake_dev')\n#3 /usr/share/php/Cake/Cache/Cache.php(184): __d('cake_dev', 'Cache engine "%...', '_cake_core_')\n#4 /usr/share/php/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_')\n#5 /etc/zm/core.php(375): Cache::config('_cake_core_', Array)\n#6 /usr/share/php/Cake/Core/Configure.php(72): include('/etc/zm/core.ph...')\n#7 /usr/share/php/Cake/bootstrap.php(431): Configure::bootstrap(true)\n#8 /usr/share/zoneminder/www/api/app/webroot/index.php(90): include('/usr/share/php/...')\n#9 {main}\n thrown in /usr/share/php/Cake/Cache/Engine/ApcEngine.php on line 91
I had the same issue, because php-apcu and php-apcu-bc were missing. If Ubuntu has packages like php7.0-apcu and php7.0-apcu-bc, you might want to use them instead.
After installation, you need to reload apache.
Now I'm stuck with:BRCode: Select all
PHP Fatal error: Uncaught InternalErrorException: Internal Server Error in /usr/share/php/Cake/Error/ErrorHandler.php:276\nStack trace:\n#0 /usr/share/php/Cake/Error/ErrorHandler.php(213): ErrorHandler::handleFatalError(256, '[MissingPluginE...', '/usr/share/php/...', 138)\n#1 [internal function]: ErrorHandler::handleError(256, '[MissingPluginE...', '/usr/share/php/...', 138, Array)\n#2 /usr/share/php/Cake/Error/ErrorHandler.php(138): trigger_error('[MissingPluginE...', 256)\n#3 [internal function]: ErrorHandler::handleException(Object(MissingPluginException))\n#4 {main}\n thrown in /usr/share/php/Cake/Error/ErrorHandler.php on line 276
Re: ZM 1.30.4 API issue on ubuntu 17.10
Can you check if apcu is mentioned in phpinfo(). In order to test for your web server, create a new .php file ("version.php") in the root directory of your web server with the following content:Pyrotechnic wrote: ↑Fri Feb 09, 2018 11:17 pm Nope, looks like there's no official apc for php7.0. I've tried installing it via no-idea what methods I found online, but still getting the same error :/
Code: Select all
<?php
phpinfo();
?>
Please post:
Code: Select all
apt list --installed | grep php
Code: Select all
/etc/php/7.0/apache2/conf.d/20-apcu.ini
/etc/php/7.0/mods-available/apcu.ini
-
- Posts: 4
- Joined: Mon Apr 24, 2017 1:46 am
Re: ZM 1.30.4 API issue on ubuntu 17.10
Thanks for the help mic07, much appreciated!
/etc/php/7.0/apache2/conf.d/20-apcu.ini
/etc/php/7.0/apache2/conf.d/20-apcu_bc.ini
/etc/php/7.0/apache2/conf.d/30-apcu.ini
mentioned in the 'Additional .ini files parsed' section, but not other occurrence of 'apc' on the page.
/etc/php/7.0/apache2/conf.d/20-apcu.ini
/etc/php/7.0/apache2/conf.d/20-apcu_bc.ini
/etc/php/7.0/apache2/conf.d/30-apcu.ini
/etc/php/7.0/mods-available/apcu.ini
/etc/php/7.0/mods-available/apcu_bc.ini
I get:
/etc/php/7.0/apache2/conf.d/20-apcu.ini
/etc/php/7.0/apache2/conf.d/20-apcu_bc.ini
/etc/php/7.0/apache2/conf.d/30-apcu.ini
mentioned in the 'Additional .ini files parsed' section, but not other occurrence of 'apc' on the page.
Code: Select all
cakephp/artful,artful,now 2.8.5-1 all [installed,automatic]
cakephp-scripts/artful,artful,now 2.8.5-1 all [installed,automatic]
libapache2-mod-php/artful,artful,now 1:7.1+54ubuntu1 all [installed]
libapache2-mod-php7.0/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
libapache2-mod-php7.1/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
libphp-serialization-perl/artful,artful,now 0.34-1 all [installed,automatic]
php/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic]
php-apcu/artful,now 5.1.8+4.0.11-1build1 amd64 [installed]
php-apcu-bc/artful,now 1.0.3-2ubuntu1 amd64 [installed,automatic]
php-bz2/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic]
php-common/artful,artful,now 1:54ubuntu1 all [installed]
php-curl/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic]
php-gd/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic]
php-mbstring/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic]
php-mcrypt/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic]
php-mysql/artful,artful,now 1:7.1+54ubuntu1 all [installed]
php-pear/artful,artful,now 1:1.10.5+submodules+notgz-1 all [installed]
php-php-gettext/artful,artful,now 1.0.12-0.1 all [installed,automatic]
php-phpseclib/artful,artful,now 2.0.6-1 all [installed,automatic]
php-tcpdf/artful,artful,now 6.2.12+dfsg2-1ubuntu1 all [installed,automatic]
php-xml/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic]
php-zip/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic]
php7.0/now 7.0.22-0ubuntu0.17.04.1 all [installed,local]
php7.0-bz2/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-cli/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-common/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-curl/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-gd/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-json/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-mbstring/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-mcrypt/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-mysql/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-opcache/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-readline/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-xml/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.0-zip/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local]
php7.1/artful-updates,artful-updates,now 7.1.11-0ubuntu0.17.10.1 all [installed,automatic]
php7.1-bz2/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-cli/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-common/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-curl/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-dev/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed]
php7.1-gd/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-json/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-mbstring/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-mcrypt/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-mysql/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-opcache/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-readline/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-xml/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
php7.1-zip/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic]
phpmyadmin/artful,artful,now 4:4.6.6-5 all [installed]
pkg-php-tools/artful,artful,now 1.35 all [installed,automatic]
I have:mic07 wrote: ↑Mon Feb 12, 2018 6:26 pm And please also check if you have files like:Code: Select all
/etc/php/7.0/apache2/conf.d/20-apcu.ini /etc/php/7.0/mods-available/apcu.ini
/etc/php/7.0/apache2/conf.d/20-apcu.ini
/etc/php/7.0/apache2/conf.d/20-apcu_bc.ini
/etc/php/7.0/apache2/conf.d/30-apcu.ini
/etc/php/7.0/mods-available/apcu.ini
/etc/php/7.0/mods-available/apcu_bc.ini
Re: ZM 1.30.4 API issue on ubuntu 17.10
Did you try a clean installation with only one PHP version in the past?Pyrotechnic wrote: ↑Mon Feb 12, 2018 10:19 pm mentioned in the 'Additional .ini files parsed' section, but not other occurrence of 'apc' on the page.
I have:Code: Select all
cakephp/artful,artful,now 2.8.5-1 all [installed,automatic] cakephp-scripts/artful,artful,now 2.8.5-1 all [installed,automatic] libapache2-mod-php/artful,artful,now 1:7.1+54ubuntu1 all [installed] libapache2-mod-php7.0/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] libapache2-mod-php7.1/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] libphp-serialization-perl/artful,artful,now 0.34-1 all [installed,automatic] php/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic] php-apcu/artful,now 5.1.8+4.0.11-1build1 amd64 [installed] php-apcu-bc/artful,now 1.0.3-2ubuntu1 amd64 [installed,automatic] php-bz2/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic] php-common/artful,artful,now 1:54ubuntu1 all [installed] php-curl/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic] php-gd/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic] php-mbstring/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic] php-mcrypt/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic] php-mysql/artful,artful,now 1:7.1+54ubuntu1 all [installed] php-pear/artful,artful,now 1:1.10.5+submodules+notgz-1 all [installed] php-php-gettext/artful,artful,now 1.0.12-0.1 all [installed,automatic] php-phpseclib/artful,artful,now 2.0.6-1 all [installed,automatic] php-tcpdf/artful,artful,now 6.2.12+dfsg2-1ubuntu1 all [installed,automatic] php-xml/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic] php-zip/artful,artful,now 1:7.1+54ubuntu1 all [installed,automatic] php7.0/now 7.0.22-0ubuntu0.17.04.1 all [installed,local] php7.0-bz2/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-cli/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-common/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-curl/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-gd/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-json/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-mbstring/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-mcrypt/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-mysql/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-opcache/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-readline/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-xml/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.0-zip/now 7.0.22-0ubuntu0.17.04.1 amd64 [installed,local] php7.1/artful-updates,artful-updates,now 7.1.11-0ubuntu0.17.10.1 all [installed,automatic] php7.1-bz2/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-cli/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-common/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-curl/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-dev/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed] php7.1-gd/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-json/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-mbstring/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-mcrypt/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-mysql/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-opcache/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-readline/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-xml/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] php7.1-zip/artful-updates,now 7.1.11-0ubuntu0.17.10.1 amd64 [installed,automatic] phpmyadmin/artful,artful,now 4:4.6.6-5 all [installed] pkg-php-tools/artful,artful,now 1.35 all [installed,automatic]
/etc/php/7.0/apache2/conf.d/20-apcu.ini
/etc/php/7.0/apache2/conf.d/20-apcu_bc.ini
/etc/php/7.0/apache2/conf.d/30-apcu.ini
/etc/php/7.0/mods-available/apcu.ini
/etc/php/7.0/mods-available/apcu_bc.ini
Maybe your php extension is not loaded correctly. Normally php is loading extensions from the "extension_dir".
Please check your phpinfo() output for "Core => PHP Version" and "Core => extension_dir". This will specify which php-version is loaded and where it does expect the extensions.
If you do (please adjust PHP Version)
Code: Select all
cat /etc/php/<PHP Version>/apache2/conf.d/20-apcu.ini
In order to find the extension on your system, you can use find:
Code: Select all
find / -name apcu.so
Re: ZM 1.30.4 API issue on ubuntu 17.10
I was able to get the API working fully in ZM 1.30.4 and Puppy Linux Artful 17.10.
There were 3 directories missing and needed to be created and a symlink to /var/tmp.
For some reason the /usr/share/zoneminder/www/api/app/Config/core.php is does not exist but in it's place is a symlink to /etc/zm/core.php which does not exist.
The entire /usr/share/zoneminder/www/api/app/Plugin was missing. I copied the missing folder from another installation for the Crud stuff.
finally when the missing directories were either created or copied ownership of the zoneminder
and I had to install php-apcu-bc_1.0.3 with php-apcu_5.1.8+4.0.11
enable the modules and restarted Apache2
the url http://zm-server/zm/api/host/getVersion.json gives the response
zmNinja also works well.
There were 3 directories missing and needed to be created and a symlink to /var/tmp.
For some reason the /usr/share/zoneminder/www/api/app/Config/core.php is does not exist but in it's place is a symlink to /etc/zm/core.php which does not exist.
The entire /usr/share/zoneminder/www/api/app/Plugin was missing. I copied the missing folder from another installation for the Crud stuff.
finally when the missing directories were either created or copied ownership of the zoneminder
Code: Select all
chown -R www-data /usr/share/zoneminder
enable the modules and restarted Apache2
the url http://zm-server/zm/api/host/getVersion.json gives the response
Code: Select all
{"version":"1.30.4","apiversion":"1.0"}
Re: ZM 1.30.4 API issue on ubuntu 17.10
After reading entiere thread I've discovered that my problem can be the lack of the folder /usr/share/zoneminder/www/api/app/Plugin.
... but I've a very noob and I've not understand what I must do with Crud (what is Crud?) and where to find the content to copy in the folder.
Please somenone can post some simple step for me?
... but I've a very noob and I've not understand what I must do with Crud (what is Crud?) and where to find the content to copy in the folder.
Please somenone can post some simple step for me?
Re: ZM 1.30.4 API issue on ubuntu 17.10
Your best bet is to start over with Ubuntu 16.04. See the install instructions at:naamah75 wrote: ↑Thu Feb 22, 2018 1:44 pm After reading entiere thread I've discovered that my problem can be the lack of the folder /usr/share/zoneminder/www/api/app/Plugin.
... but I've a very noob and I've not understand what I must do with Crud (what is Crud?) and where to find the content to copy in the folder.
Please somenone can post some simple step for me?
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
There are too many issues with your install on Ubuntu 17.10 and support time for it is very limited. Yes, you can try to fix it and in time you will learn some things about Linux like I did (I asked a co-worker for help learning operating systems. He refused and I set out on my own to learn. 30 years later he regets his actions and comes to me for help).
Re: ZM 1.30.4 API issue on ubuntu 17.10
I agree with bbunge.....better to go with Ubuntu 16.04...install is straightforward and ZM 1.30.4 runs really well using it. I only did the repairs to the Artful Puppy Linux for the challenge and a better understanding of ZM.... Crud is a mnemonic for the common operations you need for data in a database: Create Retrieve Update Delete. There is a set of functions that need to go along with ZM and are in the /plugins folder buried in the ZM directories. That folder and the stuff in it PLUS some main components of CakePHP (like the core.php) is not there or where they should be after installation of ZM in Ubuntu Artful (and variants)...so no API functions.
in case you are up for learning more and attempting to fix your 17.10 install here is the link to the plugin folder but be warned it is somewhat tricky to get it all going. https://github.com/ZoneMinder/zoneminde ... app/Plugin
in case you are up for learning more and attempting to fix your 17.10 install here is the link to the plugin folder but be warned it is somewhat tricky to get it all going. https://github.com/ZoneMinder/zoneminde ... app/Plugin
Re: ZM 1.30.4 API issue on ubuntu 17.10
Thanks guys! I can't go back to 16.04, I host other servers on my machine... so, I must try!
Re: ZM 1.30.4 API issue on ubuntu 17.10
you could for fun download this /zoneminder/api folder and overwrite the /usr/share/zoneminder/api directory with this one and make sure you have the php-apcu and php-apcu-bc modules installed and enabled with then a restart of Apache and see if this URL gives a response
Code: Select all
http://localhost/zm/api/host/getVersion.json
Re: ZM 1.30.4 API issue on ubuntu 17.10
Well, looks like you are in a bind. I say this because you will likely want to upgrade to 18.04 when it is released at the end of April. If you spend a lot of time getting Zoneminder to work on 17.10 it is highly likely the upgrade to 18.04 will mess it up again. Just wanted you to know.
Here goes:
uninstall and purge Zoneminder:
apt remove zoneminder
then
apt purge zoneminder
May as well remove dependencies when promped.
Drop the zm database: mysql
mysql -uroot -p
mysql> DROPDATABASE zm;
/q
follow the instructions here it install Zoneminder:
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
Since you have other databases use the alternate entry in my.cnf