Discovery Plugin, Ubuntu 16.04LTS, PHP7

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
redneckgeek
Posts: 19
Joined: Mon Dec 05, 2011 11:31 am

Discovery Plugin, Ubuntu 16.04LTS, PHP7

Post by redneckgeek »

Installed new box with Ubuntu 16.04LTS, apt-get install cacti.. all good seems to work. Install a couple plugins (thold, discovery) all seems ok. Setup Discovery Template, setup scan.. wait...

No devices discovered. Check logs:

poller-error.log:PHP Fatal error: Uncaught Error: Call to undefined function mysql_query() in /usr/share/cacti/site/plugins/discovery/setup.php:349
poller-error.log:#0 /usr/share/cacti/site/lib/plugins.php(60): discovery_poller_bottom(Array)
poller-error.log: thrown in /usr/share/cacti/site/plugins/discovery/setup.php on line 349

Go look at line 349
$result = mysql_query($sql) or die (mysql_error());

According to google... now we have to use mysqli_query with PHP7... but it takes two arguments... so I lazily punted to the board.
:-)
/rh
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Discovery Plugin, Ubuntu 16.04LTS, PHP7

Post by cigamit »

Current version of Cacti does not work with PHP7. We have it fixed in Cacti 1.0, but until that is released, you will have to use an older version of PHP.
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Re: Discovery Plugin, Ubuntu 16.04LTS, PHP7

Post by dagonet »

I have the current version of Cacti (0.8.8h) running with PHP7. The discovery plugin works like a charm.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests