Hello,
I have an error on a call on api_device.php.
The call I made is on the stack trace, and it's to api_device_save
Here is the output:
Fatal error: Uncaught Error: Call to undefined function poller_push_to_remote_db_connect() in /usr/share/cacti/lib/api_device.php:658
Stack trace:
#0 /usr/share/cacti/plugins/linkdiscovery/findhosts.php(600): api_device_save('0', '6', 'se-ch9-40', 'se-ch9-40.recol...', 'telvlsn', '2', '', '', '161', '500', false, '2', '2', '23', '400', '1', 'Added by Link D...', '', '', '', '', '', 10, 1, 1, 0)
Error on api_device.php
Moderators: Developers, Moderators
Error on api_device.php
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Re: Error on api_device.php
The poller_push_to_remote_db_connect() function lives in lib/poller.php. lib/api_device.php itself does not include lib/poller.php does that function would not be found unless the plugin in question was also including lib/poller.php
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Error on api_device.php
Well not sure to understand you point
But for me if api_device.php is using an external function, it has to include all the lib needed to be able to use it.
I will definitely not include poller.php into my plugin.
As for testing purpose, it's working if I declare poller.php int my file, but nothing special about that. And it's not the way to do it
But for me if api_device.php is using an external function, it has to include all the lib needed to be able to use it.
I will definitely not include poller.php into my plugin.
As for testing purpose, it's working if I declare poller.php int my file, but nothing special about that. And it's not the way to do it
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Re: Error on api_device.php
If you have not already done so, feel free to open it as an issue on GitHub.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Who is online
Users browsing this forum: No registered users and 0 guests