Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
Bloodrule
Posts: 9
Joined: Sun Sep 09, 2018 11:19 pm
Location: Melbourne, AU

Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by Bloodrule » Sun Sep 09, 2018 11:30 pm

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?

bbunge
Posts: 2153
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by bbunge » Mon Sep 10, 2018 2:04 am

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

Bloodrule
Posts: 9
Joined: Sun Sep 09, 2018 11:19 pm
Location: Melbourne, AU

Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by Bloodrule » Mon Sep 10, 2018 4:57 am

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.

Bloodrule
Posts: 9
Joined: Sun Sep 09, 2018 11:19 pm
Location: Melbourne, AU

Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by Bloodrule » Tue Sep 11, 2018 3:39 am

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?

rockedge
Posts: 901
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by rockedge » Tue Sep 11, 2018 6:23 pm

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

Bloodrule
Posts: 9
Joined: Sun Sep 09, 2018 11:19 pm
Location: Melbourne, AU

Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by Bloodrule » Tue Sep 11, 2018 7:34 pm

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?

bbunge
Posts: 2153
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by bbunge » Tue Sep 11, 2018 8:08 pm

Check to see if you have two versions of PHP. If you still have PHP5 uninstall it.

rockedge
Posts: 901
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by rockedge » Wed Sep 12, 2018 7:08 pm

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

Code: Select all

ap2enmod apcu
ap2enmod apcu-bc
and restart Apache

Bloodrule
Posts: 9
Joined: Sun Sep 09, 2018 11:19 pm
Location: Melbourne, AU

Re: Upgrade Debian 8/zm 1.29 to Debian 9/zm 1.30.4 broke APIs

Post by Bloodrule » Thu Sep 13, 2018 9:19 pm

Thanks for your help. All working now thanks to your suggestions.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests