web log issue

Discussion in 'General' started by mini14, Dec 31, 2010.

  1. mini14

    mini14 Member

    I started noticing this in my server logs a while ago. Please help!

    Code:
    [B]ispconfig/scripts/shell/logs.php
    
    PHP Warning:  Invalid argument supplied for foreach() in /root/ispconfig/scripts/shell/logs.php on line 173[/B]
    
    [COLOR=Red][B][I]__line 173__[/I][/B][/COLOR]
    foreach($index as $i => $t) {
        if($t < time()-86400*$purge) {
          @unlink($dir.'/'.$files[$i]);
        }
      }
    }
    
    $time_end = getmicrotime();
    $dauer = $time_end - $time_start;
    //echo "Duration: $dauer seconds. Lines: $zeilen_gesamt\n";
    
    ?>
    
    ====================================================================
    
    [B]PHP Warning:  readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
    [/B]
    
    // Traffic auswerten und Symlinks für Webalizer aktualisieren
    foreach($traffic as $virtual_host => $bytes) {
    
            if(trim($virtual_host) != '' && trim($virtual_host)!='localhost') {
                    // Traffic in DB Schreiben
                    // Bestimme Web-ID
    [COLOR=Red][I][B] __line 125___ [/B][/I][/COLOR]      $link =  readlink("$webroot/$virtual_host");
                    $parts = split("/",$link);
                    $web_id = intval(substr($parts[count($parts) - 1],3));
     
    Last edited: Dec 31, 2010

Share This Page