MySQL error: Warning: Invalid argument supplied for foreach
Moderators: Developers, Moderators
MySQL error: Warning: Invalid argument supplied for foreach
Hi guys,
Yesterday I installed the whole Cacti package. Also apache, PHP and stuff. Cacti is working but the tabs Monitor and Weathermap are acting strange. When I open there's a error its showed in the attachment. And also if I click another link the link is changing from http://localhost/cacti/plugins/weatherm ... plugin.php to http://localhost/cacti/plugins/weatherm ... plugin.php.
Does anybody know what this could be?
Yesterday I installed the whole Cacti package. Also apache, PHP and stuff. Cacti is working but the tabs Monitor and Weathermap are acting strange. When I open there's a error its showed in the attachment. And also if I click another link the link is changing from http://localhost/cacti/plugins/weatherm ... plugin.php to http://localhost/cacti/plugins/weatherm ... plugin.php.
Does anybody know what this could be?
- Attachments
-
- error1.JPG (142.59 KiB) Viewed 8508 times
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: MySQL error: Warning: Invalid argument supplied for fore
Install 0.97a instead - there are plenty of bugfixes in that 'a'.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: MySQL error: Warning: Invalid argument supplied for fore
Did tried it, but it won't work. Could it be something with Linked-Tables Infrastructure?Howie wrote:Install 0.97a instead - there are plenty of bugfixes in that 'a'.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: MySQL error: Warning: Invalid argument supplied for fore
Did you set url_path in global.php? Does it end with a / ?
I noticed that all your tabs are borken - that's usually a sign that url_path is wrong. The links growing makes me think that, too.
There might be something else, to cause the foreach() error, but I think that might be part of it.
I noticed that all your tabs are borken - that's usually a sign that url_path is wrong. The links growing makes me think that, too.
There might be something else, to cause the foreach() error, but I think that might be part of it.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: MySQL error: Warning: Invalid argument supplied for fore
Solved the broken links but still MySQL errors.
- Attachments
-
- errror2.JPG (152.83 KiB) Viewed 8494 times
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: MySQL error: Warning: Invalid argument supplied for fore
I don't see any MySQL error - please could you post that error message?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: MySQL error: Warning: Invalid argument supplied for fore
Sure..Howie wrote:I don't see any MySQL error - please could you post that error message?
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\cacti\plugins\weathermap\weathermap-cacti-plugin.php on line 824
Call Stack
# Time Memory Function Location
1 0.0031 621080 {main}( ) ..\weathermap-cacti-plugin.php:0
2 0.1132 7323824 weathermap_get_valid_tabs( ) ..\weathermap-cacti-plugin.php:260
Network Weathermaps automatically cycle between full-size maps)
Click on thumbnails for a full view (or you can automatically cycle between full-size maps)
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\cacti\plugins\weathermap\weathermap-cacti-plugin.php on line 824
Call Stack
# Time Memory Function Location
1 0.0031 621080 {main}( ) ..\weathermap-cacti-plugin.php:0
2 0.1141 7323480 weathermap_thumbview( ) ..\weathermap-cacti-plugin.php:269
3 0.1158 7324560 weathermap_tabs( ) ..\weathermap-cacti-plugin.php:419
4 0.1158 7324560 weathermap_get_valid_tabs( ) ..\weathermap-cacti-plugin.php:838
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: MySQL error: Warning: Invalid argument supplied for fore
(that's not a SQL error)
Does the weathermap_maps table exist in the database? Do any weathermap_* tables exist in the database?
Does the weathermap_maps table exist in the database? Do any weathermap_* tables exist in the database?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: MySQL error: Warning: Invalid argument supplied for fore
Uhm... no but i thought i added them.
It's this, right?
CREATE TABLE weathermap_maps (
id int(11) NOT NULL auto_increment,
sortorder int(11) NOT NULL default 0,
group_id int(11) NOT NULL default 1,
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,
thumb_width int(11) NOT NULL default 0,
thumb_height int(11) NOT NULL default 0,
schedule varchar(32) NOT NULL default '*',
archiving set('on','off') NOT NULL default 'off',
PRIMARY KEY (id)
);
Could you please give me the right code?
It's this, right?
CREATE TABLE weathermap_maps (
id int(11) NOT NULL auto_increment,
sortorder int(11) NOT NULL default 0,
group_id int(11) NOT NULL default 1,
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,
thumb_width int(11) NOT NULL default 0,
thumb_height int(11) NOT NULL default 0,
schedule varchar(32) NOT NULL default '*',
archiving set('on','off') NOT NULL default 'off',
PRIMARY KEY (id)
);
Could you please give me the right code?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: MySQL error: Warning: Invalid argument supplied for fore
You shouldn't need to add anything - the plugin is supposed to create it's own tables.
So... did you import the pa.sql when you installed the plugin architecture?
So... did you import the pa.sql when you installed the plugin architecture?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: MySQL error: Warning: Invalid argument supplied for fore
Yes, I did. But know I'm adding the tables manually and know its working, I thinkHowie wrote:You shouldn't need to add anything - the plugin is supposed to create it's own tables.
So... did you import the pa.sql when you installed the plugin architecture?
I added auth, data, groups, maps, setting. With titles ofc
Who is online
Users browsing this forum: No registered users and 0 guests