View Single Post
  #10  
Old 6th January 2006, 16:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Please post the output of
Code:
ls -la /home
Quote:
Could you please tell me where the information "readlink("$webroot/$virtual_host");" is drawn from? I think its not correct.
$webroot is taken from the ISPConfig database:
PHP Code:
$webroot stripslashes($server["server_path_httpd_root"]); 
$virtual_host is taken from the Apache access.log:
PHP Code:
if(is_file($access_log)) {
        
$traffic = array();
        
$fd fopen($access_log"r");
        while(!
feof($fd)){

                
$buffer fgets($fd);
                list(
$virtual_host,$bytes,$normal_log) = explode("||||",$buffer);
                
$bytes trim($bytes);
                if(
$bytes != "-"$traffic[$virtual_host] += $bytes;

                
// Logfile schreiben
                
if($virtual_host != '') {

                        if(isset(
$handles[$virtual_host])) {
                                
$h $handles[$virtual_host];
                                unset(
$handles[$virtual_host]);
                                
$handles[$virtual_host] = $h;
                        } else {
                                
// Handle noch nicht in Liste
                                
if(count($handles) > $max_handles) {
                                        unset(
$handles[0]);
                                }
                                
$filename get_filename($virtual_host);
                                
$handles[$virtual_host]= fopen($filename'a');
                        }

                        
$handle $handles[$virtual_host];

                        if (!
fwrite($handle$normal_log)) {
                                
//echo "Cannot write to file ($filename)";
                        
} else {
                                
$zeilen_gesamt++;
                        }
                }
        }
        
fclose ($fd);

        
// die offenen Handles schliessen
        
foreach($handles as $handle) {
                
fclose($handle);
        }

} else {
        die(
"Access log not found: $access_log");

__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote