View Single Post
  #6  
Old 6th January 2006, 16:09
Zoon Zoon is offline
Member
 
Join Date: Sep 2005
Posts: 30
Thanks: 0
Thanked 1 Time in 1 Post
Default

Checking further, the usage stats in ISPConfig are also showing 0.00mb for this month. I think my problem could be to do with the error message coming from logs.php which I pasted earlier.

// Traffic auswerten und Symlinks für Webalizer aktualisieren
foreach($traffic as $virtual_host => $bytes) {

if(trim($virtual_host) != '') {
// Traffic in DB Schreiben
// Bestimme Web-ID
$link = readlink("$webroot/$virtual_host"); <-- This is line 125
$parts = split("/",$link);
$web_id = intval(substr($parts[count($parts) - 1],3));

if($web_id > 0) {
$verify = $mod->db->queryAllRecords("SELECT * FROM isp_traffic WHERE web_id = '$web_id' AND monat = '$monat_jahr'");
if(empty($verify)){
$mod->db->query("INSERT INTO isp_traffic (web_id, monat, jahr, bytes_web, datum) VALUES ('$web_id','$monat_jahr','$jahr','$bytes','$curren t_time')");
} else {
$mod->db->query("UPDATE isp_traffic SET bytes_web = bytes_web + $bytes WHERE web_id = '$web_id' AND monat = '$monat_jahr'");
}
}

// Symlinks für webalizer korrigieren, falls neuer Monat
if(@readlink("$webroot/$virtual_host/log/web.log") != get_filename($virtual_host)) {
if(is_link("$webroot/$virtual_host/log/web.log")) @unlink("$webroot/$virtual_host/log/web.log");
@symlink(get_filename($virtual_host),"$webroot/$virtual_host/log/web.log");
}
clearstatcache();
$web_owner = @fileowner($webroot."/".$virtual_host."/log");
exec("chown -R ".$web_owner.":web".$web_id." ".$webroot."/".$virtual_host."/log &> /dev/null");
}

}
Reply With Quote