Jump to content

major error really frustrating


stelthius

Recommended Posts

ok ive got a script off a friend to show all running processes on the server (linux)

 

No ive gone to use the script and it is full off errors liek this one for instance

 

 

Warning: Invalid argument supplied for foreach() in /var/www/html/services.php on line 45

 


  $services = $db->do_raw_query('list_system_daemons');
}
else
{
  $services = $status['services'];
}

//

foreach ($services as $val);              /** THIS IS LINE 45 **/
{
    print '<tr><td class="listpad">' . $val . '</td><td class="listpad" align=center>';

    if( $db->do_raw_query("service_running " . $val) )
      {

            $running = '<img src="images/solidgr.gif" border=0>';


 

 

And this error also,

 

 

Fatal error: Call to a member function do_raw_query() on a non-object in /var/www/html/services.php on line 49

 

 


print '<tr><td class="listpad">' . $val . '</td><td class="listpad" align=center>';

    if( $db->do_raw_query("service_running " . $val) )                         /** THIS IS LINE 49 **/
      {

            $running = '<img src="images/solidgr.gif" border=0>';
            $start = '<img src="images/start_grey.gif" border=0>';


 

 

Any help at all is appretiated guys :D

 

Link to comment
https://forums.phpfreaks.com/topic/116335-major-error-really-frustrating/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.