Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weathermap disabled - Uncaught Error: Class "index" not found #52

Closed
esanders83 opened this issue Jan 17, 2023 · 7 comments
Closed

weathermap disabled - Uncaught Error: Class "index" not found #52

esanders83 opened this issue Jan 17, 2023 · 7 comments

Comments

@esanders83
Copy link

esanders83 commented Jan 17, 2023

Hello,
I'm running the following:

  • Ubuntu 22.04.1 LTS (jammy)
  • PHP 8.1.2 (apt stock)
  • NGINX 1.18 (apt stock)
  • Cacti 1.3.0(git clone -> dev eaefda08)

I installed weathermap from git clone (https://github.com/Cacti/plugin_weathermap.git), changed permissions, and I enabled/install the plugin. Once I start trying to add a map Weathermap crashes and the cacti.log shows:

2023-01-17 14:40:07 - ERROR PHP WARNING in  Plugin 'weathermap': Cannot modify header information - headers already sent by (output started at /var/www/html/cacti/lib/functions.php:1543) in file: /var/www/html/cacti/plugins/weathermap/lib/datasources/index.php  on line: 42
2023-01-17 14:40:07 - CMDPHP PHP ERROR WARNING Backtrace:  (/poller.php[863]:api_plugin_hook(), /lib/plugins.php[89]:api_plugin_run_plugin_hook(), /lib/plugins.php[237]:weathermap_poller_bottom(), /plugins/weathermap/setup.php[1111]:weathermap_run_maps(), /plugins/weathermap/lib/poller-common.php[360]:WeatherMap->__construct(), /plugins/weathermap/lib/WeatherMap.class.php[372]:WeatherMap->Reset(), /plugins/weathermap/lib/WeatherMap.class.php[529]:WeatherMap->LoadPlugins(), /plugins/weathermap/lib/WeatherMap.class.php[822]:include_once(), /plugins/weathermap/lib/datasources/index.php[42]:header(), CactiErrorHandler())
2023-01-17 14:40:07 - ERROR PHP ERROR in  Plugin 'weathermap': Uncaught Error: Class "index" not found in /var/www/html/cacti/plugins/weathermap/lib/WeatherMap.class.php:841 Stack trace: #0 /var/www/html/cacti/plugins/weathermap/lib/WeatherMap.class.php(529): WeatherMap->LoadPlugins() #1 /var/www/html/cacti/plugins/weathermap/lib/WeatherMap.class.php(372): WeatherMap->Reset() #2 /var/www/html/cacti/plugins/weathermap/lib/poller-common.php(360): WeatherMap->__construct() #3 /var/www/html/cacti/plugins/weathermap/setup.php(1111): weathermap_run_maps() #4 /var/www/html/cacti/lib/plugins.php(237): weathermap_poller_bottom() #5 /var/www/html/cacti/lib/plugins.php(89): api_plugin_run_plugin_hook() #6 /var/www/html/cacti/poller.php(863): api_plugin_hook() #7 {main} thrown in file: /var/www/html/cacti/plugins/weathermap/lib/WeatherMap.class.php on line: 841
2023-01-17 14:40:07 - CMDPHP PHP ERROR Backtrace:  (CactiShutdownHandler())
2023-01-17 14:40:07 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'weathermap'

What else I can provide to help troubleshoot this?

Thank you!
eric

@TheWitness
Copy link
Member

Did you install this over a pre-existing install of Weathermap? If so, move the lib folder out of the way, and copy the lib folder fresh from the cacti repo version.

@esanders83
Copy link
Author

esanders83 commented Jan 18, 2023

Hello,
This was a fresh install of Cacti and weathermap. Sorry, I accidentally closed this incident😞

@esanders83 esanders83 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2023
@esanders83
Copy link
Author

.

@esanders83 esanders83 reopened this Jan 18, 2023
@TheWitness
Copy link
Member

Okay, now I know why you are experiencing this as well as others fixing now. Helps reading the tickets on a PC and not one your phone. Old age and no glasses ;)

@TheWitness
Copy link
Member

Try out this patch as it may take a day or two to get merged.

#54

@esanders83
Copy link
Author

Hello again,
I applied the patch and it worked without any errors or reverting to disabled plugin.

Thank you for your help on this!
eric

@netniV
Copy link
Member

netniV commented Jan 18, 2023

Updated the formatting in the original post, the solution looks good.

@netniV netniV closed this as completed Jan 18, 2023
netniV pushed a commit that referenced this issue Jan 20, 2023
TheWitness added a commit that referenced this issue Jan 29, 2023
* Fixing Issues #52 & #53 - Disabling

* Fixing #57 - Wrong table alias

Invalid argument supplied for foreach() in file: /lib/ds-common.php on line: 66

* Additional fix for #57 - missing check

* Fixing Issue #55 - Bad variable

* Fixing Issue #50 - Link order

Switching Left for Right on the selection.

* Fixing trimming of file paths in #58

* mogrify images

* QA: Provide a config upgrade script

* QA: Move stats for individual maps to medium

* No longer required.  Redirect handles

* Fixing #24 Invalid colors result in errors

Logged error message when setting 'none' as scale color

* Fixing #63 - AICON's Not working

* Fixing #64 - Map scroll

* Fixing #66 - Auto-refresh

* Fixing #67 - int errors

* Restore image centering

* Fixing Issue #65 - Hover image sizes

The container should not be properly sized.

* Fixing #72 NOTES broken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants