ZoneMinder / zoneminder

ZoneMinder is a free, open source Closed-circuit television software application developed for Linux which supports IP, USB and Analog cameras.
http://www.zoneminder.com/
GNU General Public License v2.0
5.12k stars 1.22k forks source link

Error accessing the API with 1.34.23 due to CakePHP's possible incompatibility with PHP 8.0 #3163

Closed Nocifer closed 3 years ago

Nocifer commented 3 years ago

Describe Your Environment

Describe the bug In the last few days, some users reported on Zoneminder's AUR page that after upgrading to PHP 8.0, it was impossible to access the API (e.g. for using with zmNinja).

It was found that the problem was with CakePHP, and that applying 2fa0fbe448058f2826dadc44572a822af2a177d5 fixes it, so if there is ever an additional minor 1.34.x release before 1.35 and CakePHP 3.x, please consider including that commit as well.

Thank you.

mike-lloyd03 commented 3 years ago

I'm also unable to access the API running ZM on Arch (installed from the AUR). I downloaded the latest release and copied from the git repo web/api/lib/Cake to /usr/share/webapps/zoneminder/www/api/lib and renamed bootstrap.php.in to bootstrap.php (per a suggestion on the AUR). However, this doesn't work.

How does one apply 2fa0fbe as suggested above?

Nocifer commented 3 years ago

@mike-lloyd03 You apply it by using git's cherry-pick command, but I've already included this fix in the latest 1.34.23-2 AUR release so you shouldn't have any issues with the API any more (I can't guarantee it first hand, but there have been no new complaints so far, so I suppose it does work). Keep in mind though that applying the fix mentioned in that comment you linked will probably break things all over again.

mike-lloyd03 commented 3 years ago

I thought I had updated to 1.34.23-2 but it turns out that the build was failing because I didn't have git setup properly and I didn't notice. After fixing that and rebuilding, everything works now! Thanks so much! People like you are what makes Arch so great.

connortechnology commented 3 years ago

1.34.24 updated cakephp to support php8