Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th November 2005, 19:54
Joe-ker Joe-ker is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access logs are not recycled

Hi,

I setup ISPconfig with the debian perfect setup and created 5 sites...

now i noticed that the access log files of the users (/var/www/web_user/log/2005/11/web.log are growing more and more... I noticed this becouse 2 sites have got quota limits on it, and one of them has exceeded its limit so far...

which process should delete old content from the file? The option setting in the site is set to default 30% Filesize...
I only found the process which produces this file (/root/ispconfig/scripts/shell/logs.php)...

Does anyone know a solution for this problem?
Reply With Quote
Sponsored Links
  #2  
Old 11th November 2005, 23:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,395
Thanks: 833
Thanked 5,490 Times in 4,322 Posts
Default

In the settings of the website, on the options tab, you can set the limit for the logfile in MB or % of the quotasize of the site.
Reply With Quote
  #3  
Old 13th November 2005, 15:12
Joe-ker Joe-ker is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thats the reason why I posted this here...

This option doesnt work...!

Log-Limit is set to default 30% (and the Quota is NOT set to unlimited *g*) and log files are growing more and more...
Reply With Quote
  #4  
Old 13th November 2005, 17:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Does the log file belong to the correct user and group (user: site administrator, group: web group)?
Please post the output of
Code:
repquota -avug|grep web1
where you replace web1 with the correct web.
Also post the output of
Code:
ls -l /var/www/web_user/log/2005/11/web.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
  #5  
Old 13th November 2005, 17:16
Joe-ker Joe-ker is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

repquota for user (i just set the quota higher becouse of this problem... - it should only be at about 50MB):

web8_ -- 76460 0 0 1743 0 0
web8 -- 76464 204800 204800 1745 0 0

la -l users log dir:

-rw-r--r-- 1 web8_ web8 67740846 Nov 13 00:30 /var/www/web8/log/2005/11/web.log

in the meantime i found the code that should handle the log limits in the webalizer job... - I will play arround a litte with this script by adding some debug messages and look where it fails...
Reply With Quote
  #6  
Old 13th November 2005, 17:57
Joe-ker Joe-ker is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I got a little step further with my troubleshooting...

In the webalizer script you can find the following function at about line 154:

function dir_array($dir){
if ($dirstream = @opendir($dir)) {
while (false !== ($filename = readdir($dirstream))) {
if ($filename!="." && $filename!=".."){
if (is_file($dir."/".$filename) && !is_link($dir."/".$filename)){
$directory_array[$dir."/".$filename] = filemtime($dir."/".$filename);
}
if (is_dir($dir."/".$filename)) $directory_array = array_merge($directory_array, dir_array($dir."/".$filename));
}
}
}
closedir($dirstream);
clearstatcache();
return $directory_array;
}


This function is called at the very end of the script after checking if the logfiles are really bigger than allowed by:

while($directory_size >= $max_directory_size){
$files = dir_array($log_dir);
...

the function dir_array produces the following error (its called 3 times for one web...):

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

line 161 is the following:
if (is_dir($dir."/".$filename)) $directory_array = array_merge($directory_array, dir_array($dir."/".$filename));


Here I get confused from what is checked here and what the commands opendir, readdir, is_link, array_merge are doing in detail - sorry, I really hate arrays if i dont know which values should there be in...

any ideas?
Reply With Quote
  #7  
Old 14th November 2005, 23:01
Joe-ker Joe-ker is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

any php hacker or code maintainer out there who can help me with this issue?

im not familar enough with php to get an idea what this part of code should really do...

plz help
Reply With Quote
  #8  
Old 28th March 2006, 09:44
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,266
Thanks: 82
Thanked 24 Times in 20 Posts
Default

sorry to revive this old thread but I am having the exact same issues. Did anyone get this solved by now?
Reply With Quote
  #9  
Old 28th March 2006, 21:35
Joe-ker Joe-ker is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Sorry - I didnt post my solution...


after playing around some time with the code I mentioned that the code is fine and should be working...

I tried to execute the script with my local php version - and tata: it worked fine

I didnt investigate this trouble anymore - I just changed the chrontab to use my local php version and everything is fine...
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Issues - Access Forbidden! rytech Installation/Configuration 23 22nd June 2006 15:25
FTP access to web files in ISPConfig Rocky Installation/Configuration 14 8th November 2005 23:17
FTP access with Dreamweaver / FTPclient pjm2211 Installation/Configuration 17 1st November 2005 23:31
FTP access problem... ctroyp General 7 12th October 2005 17:07
FTP access? ctroyp Installation/Configuration 14 29th September 2005 17:26


All times are GMT +2. The time now is 21:31.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.