Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jun 22, 2017 7:03 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: routerconfigs error.. can't figure it out.
PostPosted: Sun Dec 25, 2011 4:16 pm 
Offline

Joined: Sat Nov 26, 2011 3:21 am
Posts: 10
I installed routerconfigs plugin a couple days ago and have been tearing my hair out trying to figure out why I keep getting this error on the "Devices" tab.. I have configured everything that I can, and double checked to make sure the sql database is populated with data.

Warning: Invalid argument supplied for foreach() in /var/www/html/plugins/configstore/configstore_devices.php on line 777

line 777 is this function:
Code:
   foreach ($result as $row) {
      form_alternate_row_color($colors["alternate"],$colors["light"],$i, 'line' . $row["id"]); $i++;

      $total = db_fetch_cell("SELECT count(device) FROM plugin_configstore_backups WHERE device=" . $row['id']);

                form_selectable_cell($row['backupresult'] == '0' ? '<img border=0 src="images/green-ball.png" height=10 width=10 alt="Backup Result" title="Backup OK" /></img>&nbsp;' : '<span style="white-space:nowrap"><image border=0 src="images/red-ball.png" height=10 width=10 alt="Backup Result" title="Backup Failed" /></img>&nbsp;' . '<a href="configstore_devices.php?action=viewdebug&id=' . $row['id'] . '">' . '<img border=0 src="images/debug.png" height=10 width=10 alt="Debug Info" title="Debug Info" /></img></a></span>', $row['id']);
                form_selectable_cell('<a href="configstore_devices.php?&action=edit&id=' . $row['id'] . '">' . $row['hostname'] . '</a>', $row['id']);
                form_selectable_cell("<a href=configstore_devices.php?action=viewconfig&id=" . $row['id'] . ">Current</a> - <a href=configstore_backups.php?device=" . $row['id'] . ">Backups ($total)</a>", $row['id']);
                form_selectable_cell($row['ipaddress'], $row['id']);
                form_selectable_cell($row['directory'], $row['id']);
                form_selectable_cell(($row['lastbackup'] < 1 ? '' : date('M j Y H:i:s', $row['lastbackup'])), $row['id']);
                form_selectable_cell(($row['lastchange'] < 1 ? '' : date('M j Y H:i:s', $row['lastchange'])), $row['id']);
                form_selectable_cell($row['username'], $row['id']);
                form_selectable_cell(($row['enabled'] == 'on' ? 'Yes' : '<font color=red><b>No</b></font>'), $row['id']);
                form_checkbox_cell($row["hostname"], $row["id"]);
      form_end_row();
   }
   print $nav;


using the newest Cacti version with integrated PA architecture.

any thoughts??? I haven't coded php is such a long time I'm not sure where to start looking..


Top
 Profile  
 
 Post subject: Re: routerconfigs error.. can't figure it out.
PostPosted: Wed Jan 07, 2015 12:07 pm 
Offline

Joined: Tue Jul 15, 2014 3:39 am
Posts: 34
Did you get an answer to this as I am getting the exact same thing?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group