howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
425 stars 94 forks source link

CMDPHP ERRORS DETECTED #62

Closed YATV closed 7 years ago

YATV commented 7 years ago
2017-03-03 00:52:02 - ERROR PHP ERROR in  Plugin 'weathermap': Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-visio-monitoring' at line 1' in /var/www/mydomain/plugins/weathermap/lib/cacti10-plugin-hooks.php:60
Stack trace:
#0 /var/www/mydomain/plugins/weathermap/lib/cacti10-plugin-hooks.php(60): PDO->query('show columns fr...')
#1 /var/www/mydomain/plugins/weathermap/setup10.php(40): weathermap_setup_table()
#2 /var/www/mydomain/lib/plugins.php(521): plugin_weathermap_install()
#3 /var/www/mydomain/plugins.php(65): api_plugin_install('weathermap')
#4 {main}
  thrown in file: /var/www/mydomain/plugins/weathermap/lib/cacti10-plugin-hooks.php on line: 60
2017-03-03 00:52:02 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4276 cacti_debug_backtrace)
2017-03-03 00:52:02 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'weathermap'
2017-03-03 00:54:45 - ERROR PHP ERROR in  Plugin 'weathermap': Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-visio-monitoring' at line 1' in /var/www/mydomain/plugins/weathermap/lib/cacti10-plugin-hooks.php:141
Stack trace:
#0 /var/www/mydomain/plugins/weathermap/lib/cacti10-plugin-hooks.php(141): PDO->query('SHOW COLUMNS FR...')
#1 /var/www/mydomain/plugins/weathermap/setup10.php(40): weathermap_setup_table()
#2 /var/www/mydomain/lib/plugins.php(521): plugin_weathermap_install()
#3 /var/www/mydomain/plugins.php(65): api_plugin_install('weathermap')
#4 {main}
  thrown in file: /var/www/mydomain/plugins/weathermap/lib/cacti10-plugin-hooks.php on line: 141
YATV commented 7 years ago
# php -vm
PHP 5.6.30 (cli) (built: Mar  2 2017 21:41:31)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

# uname -a
FreeBSD myhost 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22 06:12:04 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

cacti-1.0.1

network-weathermap-database-refactor
howardjones commented 7 years ago

Thanks for the report, and the patch. I've merged it. My own test installation is down, but I can't see any issue with the simple change.