Nectar: parse error/undefined variable

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Nectar: parse error/undefined variable

Post by GlueGuy »

Installed nectar 0.35a on a cacti 0.8.8a cacti system. When I attempt to add my first nectar report I get the following at the top of the screen:
Parse error: syntax error, unexpected T_STRING in /var/www/html/lib/functions.php(317) : eval()'d code on line 1
Notice: Undefined variable: message in /var/www/html/lib/functions.php on line 323
I didn't see any patches for 0.8.8a, so I must have missed something?
Last edited by GlueGuy on Mon Jan 21, 2013 11:10 am, edited 1 time in total.
---------
The Glue Guy
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Nectar: parse error/undefined variable

Post by gandalf »

I just tried to reproduce, but all is fine.
There's no need to patch anything for nectar 0.35a and Cacti 088a.
Please watch both cacti.log and httpd's error log and try to reproduce the issue
R.
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Re: Nectar: parse error/undefined variable

Post by GlueGuy »

I think the setup script did not work properly. I find these errors in the httpd log:
CMDPHP: Poller[0] ERROR: SQL Save Command Failed for Table 'plugin_nectar'. Error was 'Unknown column 'graph_linked' in 'field list''
I checked the cacti DB, and found two nectar tables (plugin_nectar & plugin_nectar_items ). Checking the status on these tables gets this
mysql> check table plugin_nectar_items;
+---------------------------+-------+----------+-------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+---------------------------+-------+----------+-------------------------------------------------+
| cacti.plugin_nectar_items | check | Error | Table 'cacti.plugin_nectar_items' doesn't exist |
| cacti.plugin_nectar_items | check | status | Operation failed |
+---------------------------+-------+----------+-------------------------------------------------+
2 rows in set (0.00 sec)

mysql> check table plugin_nectar;
+---------------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------------------+-------+----------+----------+
| cacti.plugin_nectar | check | status | OK |
+---------------------+-------+----------+----------+
1 row in set (0.00 sec)
Shouldn't I be able to disable/uninstall/re-install/re-enable it to get the tables created?
---------
The Glue Guy
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Re: Nectar: parse error/undefined variable

Post by GlueGuy »

I think what happened is that I had had an ancient version of nectar installed, that (perhaps) had different table structure?

Anyway. I dropped the two tables, then did the disable/uninstall/install/enable routine.

I am now able to add the report. However, I am now getting a similar error when I try to add items to the report.

So I think the tables were not getting created properly. After checking different things, somehow the plugin_nectar_items started working (while I was trying to debug it). Not sure what that's all about....
---------
The Glue Guy
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest