Cacti Ubuntu LTS problems with PHP8?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
matthys70
Posts: 8
Joined: Thu Jan 05, 2012 12:03 pm

Cacti Ubuntu LTS problems with PHP8?

Post by matthys70 »

I just upgraded from Ubuntu 20.04.5 LTS to Ubuntu 22.04.1 LTS and noticed many problems with Cacti :-(

This has been installed with Ubuntu 22.04.1 LTS:
Cacti = cacti (1.2.19+ds1-2ubuntu1)
PHP = PHP 8.1.2 (cli) (built: Aug 17 2022 13:08:39) (NTS)
MySQL = Server version: 8.0.30-0ubuntu0.22.04.1 (Ubuntu)

I disabled the cron-job for the moment because of high CPU load on MySQL (because of inserting data into database?), but also noticed these error messages in the log:
2022-09-19 14:20:15 - CMDPHP PHP ERROR Backtrace: (/clog.php[27]:include(), /include/auth.php[28]:require_once(), /include/global.php[438]:html_escape(), /lib/html.php[1069]:str_replace(), CactiErrorHandler())
2022-09-19 14:20:15 - ERROR PHP : str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in file: /usr/share/cacti/site/lib/html.php on line: 1069

Are there still parts not ready for PHP 8.1?

What to do .. wait for an upgrade of Cacti Ubuntu package?

Thanks,
Matthijs
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti Ubuntu LTS problems with PHP8?

Post by TheWitness »

Grab the 1.2.x branch from GitHub, or go with the 1.2.22 release. There is one minor bug in 1.2.22 that requires pulling the lib/functions.php from the 1.2.x branch, but otherwise everything is working for me an I'm using PHP 8.1.10 (latest).
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest