Error after install reportit plugin

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
lingchia
Posts: 7
Joined: Wed Oct 11, 2023 11:00 pm

Error after install reportit plugin

Post by lingchia »

Hi,

After create the reportit report, the error logs shown as below.

May i know what cause this error?

2023-10-23 16:59:32 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php[48]:top_header(), /lib/functions.php[4650]:include_once(), /include/top_header.php[27]:draw_navigation_text(), /lib/functions.php[3767]:CactiErrorHandler())
2023-10-23 16:59:32 - ERROR PHP NOTICE: Trying to access array offset on value of type null in file: /var/www/html/cacti/lib/functions.php on line: 3767
2023-10-23 16:59:32 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php[48]:top_header(), /lib/functions.php[4650]:include_once(), /include/top_header.php[27]:draw_navigation_text(), /lib/functions.php[3767]:CactiErrorHandler())
2023-10-23 16:59:32 - ERROR PHP NOTICE: Undefined index: ? in file: /var/www/html/cacti/lib/functions.php on line: 3767
User avatar
macan
Cacti Guru User
Posts: 1110
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Error after install reportit plugin

Post by macan »

which cacti version? PHP version?
Let the Cacti grow!
lingchia
Posts: 7
Joined: Wed Oct 11, 2023 11:00 pm

Re: Error after install reportit plugin

Post by lingchia »

hi macan

cacti version : 1.2.25

php version :
PHP 7.4.3-4ubuntu2.19 (cli) (built: Jun 27 2023 15:49:59) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3-4ubuntu2.19, Copyright (c), by Zend Technologies
User avatar
macan
Cacti Guru User
Posts: 1110
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Error after install reportit plugin

Post by macan »

And reportit version? Try to use
develop branch from https://github.com/Cacti/plugin_reportit
Let the Cacti grow!
lingchia
Posts: 7
Joined: Wed Oct 11, 2023 11:00 pm

Re: Error after install reportit plugin

Post by lingchia »

Hi,

my reportit version is 1.1.3. I git clone from the link that you shared.
Screenshot 2023-10-24 at 5.21.55 PM.png
Screenshot 2023-10-24 at 5.21.55 PM.png (79.39 KiB) Viewed 1225 times

i noticed, the error log generated when i navigate to:
console > management > report
Screenshot 2023-10-24 at 5.27.56 PM.png
Screenshot 2023-10-24 at 5.27.56 PM.png (234.21 KiB) Viewed 1225 times
2023-10-24 17:26:06 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php[48]:top_header(), /lib/functions.php[4650]:include_once(), /include/top_header.php[27]:draw_navigation_text(), /lib/functions.php[3769]:CactiErrorHandler())
2023-10-24 17:26:06 - ERROR PHP NOTICE: Trying to access array offset on value of type null in file: /var/www/html/cacti/lib/functions.php on line: 3769
2023-10-24 17:26:06 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php[48]:top_header(), /lib/functions.php[4650]:include_once(), /include/top_header.php[27]:draw_navigation_text(), /lib/functions.php[3769]:CactiErrorHandler())
2023-10-24 17:26:06 - ERROR PHP NOTICE: Undefined index: ? in file: /var/www/html/cacti/lib/functions.php on line: 3769
2023-10-24 17:26:06 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php[48]:top_header(), /lib/functions.php[4650]:include_once(), /include/top_header.php[27]:draw_navigation_text(), /lib/functions.php[3767]:CactiErrorHandler())
2023-10-24 17:26:06 - ERROR PHP NOTICE: Trying to access array offset on value of type null in file: /var/www/html/cacti/lib/functions.php on line: 3767
2023-10-24 17:26:06 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php[48]:top_header(), /lib/functions.php[4650]:include_once(), /include/top_header.php[27]:draw_navigation_text(), /lib/functions.php[3767]:CactiErrorHandler())
2023-10-24 17:26:06 - ERROR PHP NOTICE: Undefined index: ? in file: /var/www/html/cacti/lib/functions.php on line: 3767
User avatar
macan
Cacti Guru User
Posts: 1110
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Error after install reportit plugin

Post by macan »

hmm, cannot reproduce it (cacti 1.2.25, reportit 1.1.3), but I have php 8.1.

Please show list of all installed plugins
Let the Cacti grow!
lingchia
Posts: 7
Joined: Wed Oct 11, 2023 11:00 pm

Re: Error after install reportit plugin

Post by lingchia »

Only 1 plugin installed - reportit

How to upgrade php to 8.1? any settings required for cacti after i install php 8.1?
User avatar
macan
Cacti Guru User
Posts: 1110
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Error after install reportit plugin

Post by macan »

It shouldn't be problem of PHP version. Cacti 1.2.x works with php 5.4+

Can you try create fresh installation of cacti 1.2.25 and reportit plugin?
Let the Cacti grow!
lingchia
Posts: 7
Joined: Wed Oct 11, 2023 11:00 pm

Re: Error after install reportit plugin

Post by lingchia »

It is a fresh installed cacti & reportit plugin.
User avatar
macan
Cacti Guru User
Posts: 1110
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Error after install reportit plugin

Post by macan »

My bad, I didn't create any report. With first report the bug appears. Please report it here:
https://github.com/Cacti/plugin_reportit/issues
Let the Cacti grow!
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests