Cacti / plugin_reportit

ReportIt Plugin for Cacti
GNU General Public License v2.0
7 stars 9 forks source link

Call to undefined function #32

Closed vishnubraj closed 6 years ago

vishnubraj commented 6 years ago

Cacti version: 1.1.37

When i try to add data items to the report, the below error came up and the report it plugin stopped working. please check this


2018/08/31 12:41:50 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4628 cacti_debug_backtrace)
  thrown in file: /var/www/cacti/plugins/reportit/reports.php on line: 214
#1 {main}
#0 /var/www/cacti/plugins/reportit/reports.php(59): standard()
Stack trace:
2018/08/31 12:41:50 - ERROR PHP ERROR in  Plugin 'reportit': Uncaught Error: Call to undefined function my_id() in /var/www/cacti/plugins/reportit/reports.php:214
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 33 include_once)(/plugins/reportit/reports.php: 33 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_html.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 33
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 33 include_once)(/plugins/reportit/reports.php: 33 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/funct_html.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 33
2018/08/31 12:41:50 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 33 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 33
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 32 include_once)(/plugins/reportit/reports.php: 32 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_shared.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 32
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 32 include_once)(/plugins/reportit/reports.php: 32 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/funct_shared.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 32
2018/08/31 12:41:50 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 32 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 32
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 31 include_once)(/plugins/reportit/reports.php: 31 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/const_reports.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 31
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 31 include_once)(/plugins/reportit/reports.php: 31 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/const_reports.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 31
2018/08/31 12:41:50 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 31 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 31
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 30 include_once)(/plugins/reportit/reports.php: 30 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/const_runtime.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 30
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 30 include_once)(/plugins/reportit/reports.php: 30 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/const_runtime.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 30
2018/08/31 12:41:50 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 30 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 30
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 29 include_once)(/plugins/reportit/reports.php: 29 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_online.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 29
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 29 include_once)(/plugins/reportit/reports.php: 29 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/funct_online.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 29
2018/08/31 12:41:50 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 29 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 29
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 28 include_once)(/plugins/reportit/reports.php: 28 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_validate.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 28
2018/08/31 12:41:50 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 28 include_once)(/plugins/reportit/reports.php: 28 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/funct_validate.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 28
2018/08/31 12:41:50 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 28 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/08/31 12:41:50 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 28```
browniebraun commented 6 years ago

I haven't fixed all issues yet. Could you please check if all tables have been migrated successfully? All table names have to begin with 'pluginreportit'

vishnubraj commented 6 years ago

Yes all the reportit related tables are starting with 'pluginreportit' Please find the below output..


+--------------------------------------+
| Tables_in_cacti                      |
+--------------------------------------+
| aggregate_graph_templates            |
| aggregate_graph_templates_graph      |
| aggregate_graph_templates_item       |
| aggregate_graphs                     |
| aggregate_graphs_graph_item          |
| aggregate_graphs_items               |
| audit_log                            |
| automation_devices                   |
| automation_graph_rule_items          |
| automation_graph_rules               |
| automation_ips                       |
| automation_match_rule_items          |
| automation_networks                  |
| automation_processes                 |
| automation_snmp                      |
| automation_snmp_items                |
| automation_templates                 |
| automation_tree_rule_items           |
| automation_tree_rules                |
| cdef                                 |
| cdef_items                           |
| color_template_items                 |
| color_templates                      |
| colors                               |
| data_input                           |
| data_input_data                      |
| data_input_fields                    |
| data_local                           |
| data_source_profiles                 |
| data_source_profiles_cf              |
| data_source_profiles_rra             |
| data_source_purge_action             |
| data_source_purge_temp               |
| data_source_stats_daily              |
| data_source_stats_hourly             |
| data_source_stats_hourly_cache       |
| data_source_stats_hourly_last        |
| data_source_stats_monthly            |
| data_source_stats_weekly             |
| data_source_stats_yearly             |
| data_template                        |
| data_template_data                   |
| data_template_rrd                    |
| external_links                       |
| graph_local                          |
| graph_template_input                 |
| graph_template_input_defs            |
| graph_templates                      |
| graph_templates_gprint               |
| graph_templates_graph                |
| graph_templates_item                 |
| graph_tree                           |
| graph_tree_items                     |
| host                                 |
| host_graph                           |
| host_snmp_cache                      |
| host_snmp_query                      |
| host_template                        |
| host_template_graph                  |
| host_template_snmp_query             |
| plugin_config                        |
| plugin_db_changes                    |
| plugin_hooks                         |
| plugin_intropage_panel               |
| plugin_intropage_trends              |
| plugin_intropage_user_setting        |
| plugin_monitor_notify_history        |
| plugin_monitor_reboot_history        |
| plugin_monitor_uptime                |
| plugin_notification_lists            |
| plugin_realms                        |
| plugin_reportit_cache_measurands     |
| plugin_reportit_cache_reports        |
| plugin_reportit_cache_variables      |
| plugin_reportit_data_items           |
| plugin_reportit_data_source_items    |
| plugin_reportit_data_template_groups |
| plugin_reportit_measurands           |
| plugin_reportit_presets              |
| plugin_reportit_recipients           |
| plugin_reportit_reports              |
| plugin_reportit_rvars                |
| plugin_reportit_templates            |
| plugin_reportit_variables            |
| plugin_thold_contacts                |
| plugin_thold_daemon_data             |
| plugin_thold_daemon_processes        |
| plugin_thold_host_failed             |
| plugin_thold_host_template           |
| plugin_thold_log                     |
| plugin_thold_template_contact        |
| plugin_thold_threshold_contact       |
| poller                               |
| poller_command                       |
| poller_data_template_field_mappings  |
| poller_item                          |
| poller_output                        |
| poller_output_boost                  |
| poller_output_boost_processes        |
| poller_output_realtime               |
| poller_reindex                       |
| poller_resource_cache                |
| poller_time                          |
| reports                              |
| reports_items                        |
| sessions                             |
| settings                             |
| settings_tree                        |
| settings_user                        |
| settings_user_group                  |
| sites                                |
| snmp_query                           |
| snmp_query_graph                     |
| snmp_query_graph_rrd                 |
| snmp_query_graph_rrd_sv              |
| snmp_query_graph_sv                  |
| snmpagent_cache                      |
| snmpagent_cache_notifications        |
| snmpagent_cache_textual_conventions  |
| snmpagent_managers                   |
| snmpagent_managers_notifications     |
| snmpagent_mibs                       |
| snmpagent_notifications_log          |
| table_columns                        |
| table_indexes                        |
| thold_data                           |
| thold_template                       |
| user_auth                            |
| user_auth_cache                      |
| user_auth_group                      |
| user_auth_group_members              |
| user_auth_group_perms                |
| user_auth_group_realm                |
| user_auth_perms                      |
| user_auth_realm                      |
| user_domains                         |
| user_domains_ldap                    |
| user_log                             |
| vdef                                 |
| vdef_items                           |
| version                              |
+--------------------------------------+
141 rows in set (0.01 sec)

MariaDB [cacti]>```
browniebraun commented 6 years ago

I cannot reconstruct that. Are you using the current code from Github?

vishnubraj commented 6 years ago

Yes i am using the current code from Github..

netniV commented 6 years ago

When the plugin is installed, Cacti Core's plugin system calls plugin_<name>_install(), then (optionally) plugin_<plugin_name>_check_config() which must reside in the plugin's setup.php as functions. If the check config function is missing, it's assumed to return a value of true.

ReportIt's plugin_reportit_install() function includes hooks for the various stages of initialisation when a cacti page loads. The important one in this case is:

 api_plugin_register_hook('reportit', 'config_settings',       'reportit_config_settings',      'setup.php');

The reportit_config_settings() is the calling the reportit_define_constants() which defines the REPORTIT_BASE_PATH constant. For some reason, you are not having that constant defined.

function reportit_config_settings() {
    reportit_define_constants();
...
}

function reportit_define_constants(){
        global $config;
...
        /* define ReportIt's base paths */
        @define('REPORTIT_BASE_PATH', $config['base_path'] . '/plugins/reportit');
}

The config_settings hook is called from include/global_settings.php which is in turn included from global.php via the line include_once($config['include_path'] . '/global_settings.php'); and that is again included from auth.php which ReportIT is including.

netniV commented 6 years ago

Lets check that you have the hooks you should have, run the following in mysql:

select * from plugin_hooks where name = 'reportit';
+----+----------+-----------------------+-----------+-------------------------------+--------+
| id | name     | hook                  | file      | function                      | status |
+----+----------+-----------------------+-----------+-------------------------------+--------+
| 51 | reportit | top_header_tabs       | setup.php | reportit_show_tab             |      0 |
| 52 | reportit | top_graph_header_tabs | setup.php | reportit_show_tab             |      0 |
| 53 | reportit | draw_navigation_text  | setup.php | reportit_draw_navigation_text |      0 |
| 54 | reportit | config_arrays         | setup.php | reportit_config_arrays        |      1 |
| 55 | reportit | config_settings       | setup.php | reportit_config_settings      |      1 |
| 56 | reportit | poller_bottom         | setup.php | reportit_poller_bottom        |      0 |
+----+----------+-----------------------+-----------+-------------------------------+--------+

The above is on my system where I installed reportit, but have not yet enabled it.

netniV commented 6 years ago

@gmourani and @vishnubraj - can you both provide the above?

gmourani commented 6 years ago
mysql> select * from plugin_hooks where name = 'reportit';
+-----+----------+-----------------------+-----------+-------------------------------+--------+
| id  | name     | hook                  | file      | function                      | status |
+-----+----------+-----------------------+-----------+-------------------------------+--------+
| 119 | reportit | page_head             | setup.php | reportit_page_head            |      1 |
| 120 | reportit | top_header_tabs       | setup.php | reportit_show_tab             |      1 |
| 121 | reportit | top_graph_header_tabs | setup.php | reportit_show_tab             |      1 |
| 122 | reportit | draw_navigation_text  | setup.php | reportit_draw_navigation_text |      1 |
| 123 | reportit | config_arrays         | setup.php | reportit_config_arrays        |      1 |
| 124 | reportit | config_settings       | setup.php | reportit_config_settings      |      1 |
| 125 | reportit | poller_bottom         | setup.php | reportit_poller_bottom        |      1 |
+-----+----------+-----------------------+-----------+-------------------------------+--------+
7 rows in set (0.00 sec)

mysql>
netniV commented 6 years ago

@gmourani thanks for that. For reference use three backticks ``` and then 'sql' (no quotes) to tell the formatter it's an SQL query. Single back ticks are purely for inline code comments on a single line.

I'll take a look further to see what I can see but it looks like your setup is good so far.

netniV commented 6 years ago

Are you using the latest development version? I cloned from the repo this morning and I'm not seeing this issue and Andi (@browniebraun) has already said he isn't either.

gmourani commented 6 years ago

No, because you said previously that some codes are still incomplete. I'll download now and test it.

netniV commented 6 years ago

I mean the latest plugin code, not cacti.

gmourani commented 6 years ago

Yes, will do it now, downloading the latest reportit-plugin code from GitHub. This one -> https://github.com/Cacti/plugin_reportit.git right ?

gmourani commented 6 years ago

I've installed the latest code and it works, that fixed the problem here, thanks. Other thing I've remark, the "Show Subheads" and "Summary" check box doesn't work.

screen shot 2018-09-06 at 10 43 47 am
netniV commented 6 years ago

OK since this appears to be resolved now, I'll close this issue.

vishnubraj commented 6 years ago

i am still getting this error..

2018/09/07 09:56:50 - ERROR PHP ERROR in  Plugin 'reportit': Uncaught Error: [] operator not supported for strings in /var/www/cacti/plugins/reportit/reports.php:1199
Stack trace:
#0 /var/www/cacti/plugins/reportit/reports.php(39): form_actions()
#1 {main}
  thrown in file: /var/www/cacti/plugins/reportit/reports.php on line: 1199
2018/09/07 09:56:50 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4628 cacti_debug_backtrace)
2018/09/07 09:56:53 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'reportit'
2018/09/07 09:56:53 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 28
2018/09/07 09:56:53 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 28 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/funct_validate.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 28
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 28 include_once)(/plugins/reportit/reports.php: 28 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_validate.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 28
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 28 include_once)(/plugins/reportit/reports.php: 28 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 29
2018/09/07 09:56:53 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 29 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/funct_online.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 29
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 29 include_once)(/plugins/reportit/reports.php: 29 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_online.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 29
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 29 include_once)(/plugins/reportit/reports.php: 29 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 30
2018/09/07 09:56:53 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 30 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/const_runtime.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 30
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 30 include_once)(/plugins/reportit/reports.php: 30 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/const_runtime.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 30
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 30 include_once)(/plugins/reportit/reports.php: 30 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 31
2018/09/07 09:56:53 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 31 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/const_reports.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 31
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 31 include_once)(/plugins/reportit/reports.php: 31 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/const_reports.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 31
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 31 include_once)(/plugins/reportit/reports.php: 31 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 32
2018/09/07 09:56:53 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 32 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/funct_shared.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 32
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 32 include_once)(/plugins/reportit/reports.php: 32 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_shared.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 32
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 32 include_once)(/plugins/reportit/reports.php: 32 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP NOTICE in  Plugin 'reportit': Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in file: /var/www/cacti/plugins/reportit/reports.php  on line: 33
2018/09/07 09:56:53 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/reports.php: 33 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(REPORTIT_BASE_PATH/lib/funct_html.php): failed to open stream: No such file or directory in file: /var/www/cacti/plugins/reportit/reports.php  on line: 33
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 33 include_once)(/plugins/reportit/reports.php: 33 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP WARNING in  Plugin 'reportit': include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_html.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /var/www/cacti/plugins/reportit/reports.php  on line: 33
2018/09/07 09:56:53 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/reportit/reports.php: 33 include_once)(/plugins/reportit/reports.php: 33 CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
2018/09/07 09:56:53 - ERROR PHP ERROR in  Plugin 'reportit': Uncaught Error: [] operator not supported for strings in /var/www/cacti/plugins/reportit/reports.php:1199
Stack trace:
#0 /var/www/cacti/plugins/reportit/reports.php(39): form_actions()
#1 {main}
  thrown in file: /var/www/cacti/plugins/reportit/reports.php on line: 1199
2018/09/07 09:56:53 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4628 cacti_debug_backtrace)
2018/09/07 09:56:53 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'reportit'

I disabled the plugin and downloaded the latest code from github and installed it.. i tried it again and still getting the above error when i run the reports...

Below is my mysql output..

MariaDB [cacti]> select * from plugin_hooks where name = 'reportit';
+-----+----------+-----------------------+-----------+-------------------------------+--------+
| id  | name     | hook                  | file      | function                      | status |
+-----+----------+-----------------------+-----------+-------------------------------+--------+
|  98 | reportit | top_header_tabs       | setup.php | reportit_show_tab             |      0 |
|  99 | reportit | top_graph_header_tabs | setup.php | reportit_show_tab             |      0 |
| 100 | reportit | draw_navigation_text  | setup.php | reportit_draw_navigation_text |      0 |
| 101 | reportit | config_arrays         | setup.php | reportit_config_arrays        |      0 |
| 102 | reportit | config_settings       | setup.php | reportit_config_settings      |      0 |
| 103 | reportit | poller_bottom         | setup.php | reportit_poller_bottom        |      0 |
+-----+----------+-----------------------+-----------+-------------------------------+--------+
6 rows in set (0.00 sec)

MariaDB [cacti]>

Please check

netniV commented 6 years ago

Can you please log that issue as a new one. It's different to the above problem. I do wish GitHub had the ability to merge/split issues.