|
|
| Author |
Message |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Wed Jun 11, 2008 10:24 am Post subject: [SOLVED] Problems with Weathermaps 0.95b with Config. Files |
|
|
Hello,
I would like to use the "example.conf" but when i click on "add" in the menu "Available Weathermap Configuration Files", i have this :
Warning: Invalid argument supplied for foreach() in C:\Apache2.2\htdocs\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php on line 165
Warning: Cannot modify header information - headers already sent by (output started at C:\Apache2.2\htdocs\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php:165) in C:\Apache2.2\htdocs\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php on line 105
Last edited by Lonlie on Mon Jun 16, 2008 3:34 am; edited 1 time in total |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Wed Jun 11, 2008 10:39 am Post subject: |
|
|
Ooops. There's something making an assumption that's incorrect there.
However, I believe that it should still have added the map, if you check back in the management list?
(I'll fix the problem for 0.96 - I'm not sure why you have it and no-one else has had though) |
|
| Back to top |
|
 |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Wed Jun 11, 2008 10:43 am Post subject: |
|
|
| In the management list, i have "No Weathermaps Configured" ..... |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Wed Jun 11, 2008 11:23 am Post subject: |
|
|
| Hmm. Do you have a weathermap_maps table in your cacti database? |
|
| Back to top |
|
 |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Thu Jun 12, 2008 2:50 am Post subject: |
|
|
| I don't have a weathermap_maps table in my cacti database. |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Thu Jun 12, 2008 4:21 am Post subject: |
|
|
| Then the database creation stuff didn't work. Does the cacti database user have permission to create tables? |
|
| Back to top |
|
 |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Thu Jun 12, 2008 5:08 am Post subject: |
|
|
Sorry, i think i didn't understand very well the next to last question ...
When you talk about "cacti database", you want to know if i have a computer tab "weathermap" in cacti ?
Yes i have. |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Thu Jun 12, 2008 6:30 am Post subject: |
|
|
| Lonlie wrote: | Sorry, i think i didn't understand very well the next to last question ...
When you talk about "cacti database", you want to know if i have a computer tab "weathermap" in cacti ?
Yes i have. |
No, I meant in your Cacti mysql database - have a look with phpMyAdmin or whatever tool you use to admin your mysql.
In your cacti configuration, you created a mysql user called something like 'cacti' or 'cactiuser', and created the cacti mysql database, and then allowed that user to access the new database. Can that user also create tables?
Weathermap creates 3 or 4 tables when you install it. It looks like it was unable to do that in your system. So, do you have any tables called weathermap_(something) in your cacti database? |
|
| Back to top |
|
 |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Thu Jun 12, 2008 7:40 am Post subject: |
|
|
| Howie wrote: |
No, I meant in your Cacti mysql database - have a look with phpMyAdmin or whatever tool you use to admin your mysql.
In your cacti configuration, you created a mysql user called something like 'cacti' or 'cactiuser', and created the cacti mysql database, and then allowed that user to access the new database. Can that user also create tables? |
Yes I can.
| Howie wrote: |
Weathermap creates 3 or 4 tables when you install it. It looks like it was unable to do that in your system. So, do you have any tables called weathermap_(something) in your cacti database? |
No I haven't. To install Weathermap, I just put the Weathermap folder in Plugins folder, and in "User Management", I activated the plugins. |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Thu Jun 12, 2008 8:46 am Post subject: |
|
|
That should be enough. The plugin creates the tables itself.
In your case, for some reason it didn't.
Some people have trouble with MySQL in 'strict mode', but that only affects one of the tables, not all of them. If you don't have weathermap_data, weathermap_maps, or weathermap_auth, then I would still guess that your cacti user is unable to create tables.
Have a look in cacti.log to see if there are any errors related to weathermap, I guess. If not, check your mysql error log. |
|
| Back to top |
|
 |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Thu Jun 12, 2008 9:05 am Post subject: |
|
|
Correction : I have an other problem but not with the plugin. When i create a new host, and i want to save this, i have the message :
"Error: Save Failed."
I do nothing with my computer, and in the "Cacti log File" i have this :
06/12/2008 04:14:17 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;'
06/12/2008 04:14:17 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';'
06/12/2008 04:14:17 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1101', SQL:"CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;'
06/12/2008 04:14:17 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null;'
I have this message each 30 seconds. |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Thu Jun 12, 2008 9:56 am Post subject: |
|
|
| And in the mysql log? You might get a clue why it is happening from there. |
|
| Back to top |
|
 |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Thu Jun 12, 2008 10:46 am Post subject: |
|
|
I observed that :
When i put in comment all my plugins in the global.php , i can create a new host , save amendments ... |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Thu Jun 12, 2008 10:47 am Post subject: |
|
|
| Uncomment one by one then, to see which one is the problem. |
|
| Back to top |
|
 |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Thu Jun 12, 2008 11:19 am Post subject: |
|
|
I uncommented one by one, but the problem is resolved when I comment all plugins. So I think that when I enable a plugin like "Superlinks", the plugin works. but when i want to modify cacti, like to create a new host or like to save modifications, it doesn't work ....
Then, when i enable "weathermaps" plugin, the plugin doesn't work and i can't modify cacti.
I think there is a problem when i modify the cacti database, i can't save the modifications when I use plugins ... |
|
| Back to top |
|
 |
|