Cacti / plugin_reportit

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

Use of undefined constant REPORTIT_BASE_PATH #36

Closed gmourani closed 6 years ago

gmourani commented 6 years ago

This happen when trying to select something in the filter box.

[Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Notice: Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in /var/www/html/cacti/plugins/reportit/view.php on line 31, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(REPORTIT_BASE_PATH/lib/funct_validate.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/reportit/view.php on line 31, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_validate.php' for inclusion (include_path='.:/usr/share/pear:/usr/lib64/phplot:/usr/lib64/fpdf') in /var/www/html/cacti/plugins/reportit/view.php on line 31, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Notice: Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in /var/www/html/cacti/plugins/reportit/view.php on line 32, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(REPORTIT_BASE_PATH/lib/funct_shared.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/reportit/view.php on line 32, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_shared.php' for inclusion (include_path='.:/usr/share/pear:/usr/lib64/phplot:/usr/lib64/fpdf') in /var/www/html/cacti/plugins/reportit/view.php on line 32, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Notice: Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in /var/www/html/cacti/plugins/reportit/view.php on line 33, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(REPORTIT_BASE_PATH/lib/funct_html.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/reportit/view.php on line 33, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_html.php' for inclusion (include_path='.:/usr/share/pear:/usr/lib64/phplot:/usr/lib64/fpdf') in /var/www/html/cacti/plugins/reportit/view.php on line 33, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Notice: Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in /var/www/html/cacti/plugins/reportit/view.php on line 34, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(REPORTIT_BASE_PATH/lib/funct_online.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/reportit/view.php on line 34, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_online.php' for inclusion (include_path='.:/usr/share/pear:/usr/lib64/phplot:/usr/lib64/fpdf') in /var/www/html/cacti/plugins/reportit/view.php on line 34, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Notice: Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in /var/www/html/cacti/plugins/reportit/view.php on line 35, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(REPORTIT_BASE_PATH/lib/funct_export.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/reportit/view.php on line 35, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/funct_export.php' for inclusion (include_path='.:/usr/share/pear:/usr/lib64/phplot:/usr/lib64/fpdf') in /var/www/html/cacti/plugins/reportit/view.php on line 35, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Notice: Use of undefined constant REPORTIT_BASE_PATH - assumed 'REPORTIT_BASE_PATH' in /var/www/html/cacti/plugins/reportit/view.php on line 36, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(REPORTIT_BASE_PATH/lib/const_view.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/reportit/view.php on line 36, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Warning: include_once(): Failed opening 'REPORTIT_BASE_PATH/lib/const_view.php' for inclusion (include_path='.:/usr/share/pear:/usr/lib64/phplot:/usr/lib64/fpdf') in /var/www/html/cacti/plugins/reportit/view.php on line 36, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1 [Wed Sep 05 11:55:15 2018] [error] [client 192.168.2.147] PHP Fatal error: Call to undefined function my_report() in /var/www/html/cacti/plugins/reportit/view.php on line 426, referer: https://192.168.2.227/cacti/plugins/reportit/view.php?action=show_report&id=1

netniV commented 6 years ago

I would download the latest development version and try again as based upon the latest code the error you are getting would only appear if you tried to browse to the view.php page when the plugin was not installed.

The plugin includes "auth.php" which in turn includes global.php, functions.php etc. from the core. The plugin api would detect the reportit plugin as being installed and then via the hooks the plugin creates, call reportit_config_settings(), this in turn then calls reportit_define_constants() which defines the above missing constants.

netniV commented 6 years ago

Close this as a duplicate of #32, I believe that they are are all related.