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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.