forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: gandhi51 on September 02, 2006, 09:41:41 pm

Title: Garbage collection & logs
Post by: gandhi51 on September 02, 2006, 09:41:41 pm
Hi!

All my logs but global.inc.php are automaticaly deleted by "garbage collection" every 2 or 3 days.
Is there a script in coppermine which does this?

[edit] I have this problem since i have discover coppermine (v1.4.8). Same thing with cpg1.4.9 [/edit]

Thank you for your help.

See some line of my global.inc.php:
Quote
Garbage collection deleted logs/access.log.php at September 1, 2006, 1:00 pm
Garbage collection deleted logs/security.log.php at September 2, 2006, 8:45 pm
Garbage collection deleted logs/database.log.php at September 2, 2006, 8:45 pm

Gandhi51.
Title: Re: Garbage collection & logs
Post by: studeo on September 05, 2006, 03:40:59 am
I have this same problem and i would like to keep the log files much longer. Is this a function of coppermine or the server setup?

Thanks
Title: Re: Garbage collection & logs
Post by: Tranz on September 05, 2006, 05:36:07 am
I found out the same thing a few days. So I changed the code in include/logger.inc.php. It's only been a few days so I don't know what the consequences, if any, are yet.

FIND:
Code: [Select]
function& spring_cleaning($directory_path, $cache_time = CPG_HOUR, $exclusion_list = array('index.html')) {
REPLACE with:
Code: [Select]
function& spring_cleaning($directory_path, $cache_time = CPG_WEEK, $exclusion_list = array('index.html')) {
Title: Re: Garbage collection & logs
Post by: studeo on September 05, 2006, 03:24:41 pm
OK, I'll give that a try and report back if it stops the automatic deletes.

Thanks
Title: Re: Garbage collection & logs
Post by: gandhi51 on September 07, 2006, 01:26:46 am
I don't think that the server automaticaly delete the logs. I copied the file security.log.php in another directory. This file was never deleted. The others *.log.php in my coppermine directory was deleted.

I'll try your tips TranzNDance. Report back in a some day. Thank you very much.
Title: Re: Garbage collection & logs
Post by: Joachim Müller on September 07, 2006, 02:02:13 am
Well, if you copy those logs somwhere else, the garbage collection will of course not delete them ;D.
Title: Re: Garbage collection & logs
Post by: Tranz on September 07, 2006, 05:11:51 am
Exactly.

Should this be an option in the next version?
Title: Re: Garbage collection & logs
Post by: Joachim Müller on September 07, 2006, 06:24:59 am
I don't think so. If an admin copies the log to what he thinks a safe place, the script shouldn't mess with it. Same thing goes for renaming of log files. The gargabe collection should imo delete the files it can expect to be generated automatically. Everything it didn't create mustn't be deleted by it.
Title: Re: Garbage collection & logs
Post by: studeo on September 07, 2006, 02:43:58 pm
Then how about an option to turn off  - or set the timing of - garbage collection - that could be a solution. Allow the admin delete the files at any point he/she desires.
Title: Re: Garbage collection & logs
Post by: studeo on September 08, 2006, 01:44:37 am
OK so its one day later and all log files were 'collected' as garbage except the database log (so far)

Just a report back to you as I promised.
Title: Re: Garbage collection & logs
Post by: Tranz on September 08, 2006, 04:22:16 am
Thanks for the update. My security log from 9-3 is still there. My database log got deleted.
Title: Re: Garbage collection & logs
Post by: studeo on September 08, 2006, 02:45:30 pm
Actually, my access log still holds entries from 7/4  even though it read as 0 bytes....so just the global and the security logs were wiped clean.
Title: Re: Garbage collection & logs
Post by: gandhi51 on September 09, 2006, 11:25:32 pm
Everything it didn't create mustn't be deleted by it.

_However, each time i upload a file .htaccess with the logs, this one is deleted with the logs...

_Report: my logs are deleted again, even with the code change.

See my global.inc.php:
Quote
Garbage collection deleted logs/access.log.php at September 1, 2006, 1:00 pm
Garbage collection deleted logs/security.log.php at September 2, 2006, 8:45 pm
Garbage collection deleted logs/database.log.php at September 2, 2006, 8:45 pm
Garbage collection deleted logs/.htaccess at September 4, 2006, 12:46 am
Garbage collection deleted logs/security.log.php at September 4, 2006, 9:24 pm
Garbage collection deleted logs/database.log.php at September 5, 2006, 10:43 pm
Garbage collection deleted logs/.htaccess at September 6, 2006, 10:56 pm
Plugin 'Filetypes editor' installed at September 7, 2006, 2:24 am
Garbage collection deleted logs/access.log.php at September 8, 2006, 12:41 am
Garbage collection deleted logs/security.log.php at September 8, 2006, 1:30 pm
Title: Re: Garbage collection & logs
Post by: studeo on September 12, 2006, 04:07:14 pm
Sept. 11

All log files were deleted again.

Just an update.