Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[SOLVED] Problems with Weathermaps 0.95b with Config. Files
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
Lonlie



Joined: 05 Jun 2008
Posts: 23
Location: France

PostPosted: Wed Jun 11, 2008 10:24 am    Post subject: [SOLVED] Problems with Weathermaps 0.95b with Config. Files Reply with quote

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

PostPosted: Wed Jun 11, 2008 10:39 am    Post subject: Reply with quote

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

PostPosted: Wed Jun 11, 2008 10:43 am    Post subject: Reply with quote

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

PostPosted: Wed Jun 11, 2008 11:23 am    Post subject: Reply with quote

Hmm. Do you have a weathermap_maps table in your cacti database?
Back to top
Lonlie



Joined: 05 Jun 2008
Posts: 23
Location: France

PostPosted: Thu Jun 12, 2008 2:50 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 4:21 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 5:08 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 6:30 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 7:40 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 8:46 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 9:05 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 9:56 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 10:46 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 12, 2008 10:47 am    Post subject: Reply with quote

Uncomment one by one then, to see which one is the problem.
Back to top
Lonlie



Joined: 05 Jun 2008
Posts: 23
Location: France

PostPosted: Thu Jun 12, 2008 11:19 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group