Page 1 of 1
Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Sun Sep 09, 2018 11:30 pm
by Bloodrule
I upgraded my Debian 8 system and (without my actually asking) zm was upgraded from 1.29 to 1.30.4. The new zm is working normally from a browser but I can't get zmNinja working as the APIs are broken. I've followed all the steps in
viewtopic.php?t=26575 but without success.
Nimoy reports at the end of that post that apt-get install php7.0-gd and dpkg-reconfigure zoneminder worked for him but my system reported that php7.0-gd was already installed and the newest version and running the dpkg command returned the command prompt without any evidence of anything having happened.
I've restarted zm, restarted apache2, rebooted many times over.
The apache2 error log is saying
[Mon Sep 10 06:29:50.459443 2018] [:error] [pid 9305] [client 203.168.52.22:38121] PHP Fatal error: Call to undefined function apc_fetch() in /usr/share/php/Cake/Cache/Engine/ApcEngine.php on line 91
Any suggestions on where I'm missing something?
Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Mon Sep 10, 2018 2:04 am
by bbunge
Possible you need to install php7.0-gd Edit: sorry, did not see that you tried this!
See the WIKI for Debian9 at:
https://wiki.zoneminder.com/Debian_9_64 ... e_Easy_Way
You may need to add the timezone to : /etc/php/7.0/apache2/php.ini
Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Mon Sep 10, 2018 4:57 am
by Bloodrule
Thanks for responding. I tried adding my timezone to /etc/php/7.0/apache2/php.ini and restarted apache2 but it had no effect on the API error. Will go through the wiki for debian 9 (again) and see if I'm missing something.
Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Tue Sep 11, 2018 3:39 am
by Bloodrule
Still no joy after (again) repeating every step in
https://wiki.zoneminder.com/Debian_9_64 ... e_Easy_Way
My apache error log continues to state "PHP Fatal error: Call to undefined function apc_fetch() in /usr/share/php/Cake/Cache/Engine/ApcEngine.php on line 91"
Is it too much to hope that this error is the only reason the APIs are failing? Do you know how I can fix the fatal error?
Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Tue Sep 11, 2018 6:23 pm
by rockedge
you are missing the php-apcu and php-apcu-bc modules that are not by default in PHP 7+
find these modules and install them and enable them in PHP, and with the
other API fix it will work.
some more info
https://serverpilot.io/docs/how-to-inst ... -extension
https://packages.ubuntu.com/xenial/php/php-apcu
Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Tue Sep 11, 2018 7:34 pm
by Bloodrule
Thanks for the suggestion. I don't think I am missing the modules. When I apt-get install php-apcu and php-apcu-bc I get "0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded" with the message that I already have the latest versions of each.
But maybe there's something I need to do to enable them in PHP?
Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Tue Sep 11, 2018 8:08 pm
by bbunge
Check to see if you have two versions of PHP. If you still have PHP5 uninstall it.
Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Wed Sep 12, 2018 7:08 pm
by rockedge
But maybe there's something I need to do to enable them in PHP?
The error indicates these modules are not enabled but to make sure you must get a
phpinfo()
and see if PHP has these modules enabled
or try in a terminal
and restart Apache
Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs
Posted: Thu Sep 13, 2018 9:19 pm
by Bloodrule
Thanks for your help. All working now thanks to your suggestions.