Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Garbage collection & logs  (Read 6791 times)

0 Members and 1 Guest are viewing this topic.

gandhi51

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • La Hutte en mousse!
Garbage collection & logs
« 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.
Logged
Sans douceur, pas de torture ?

studeo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
Re: Garbage collection & logs
« Reply #1 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
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Garbage collection & logs
« Reply #2 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')) {
Logged

studeo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
Re: Garbage collection & logs
« Reply #3 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
Logged

gandhi51

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • La Hutte en mousse!
Re: Garbage collection & logs
« Reply #4 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.
Logged
Sans douceur, pas de torture ?

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Garbage collection & logs
« Reply #5 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.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Garbage collection & logs
« Reply #6 on: September 07, 2006, 05:11:51 am »

Exactly.

Should this be an option in the next version?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Garbage collection & logs
« Reply #7 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.
Logged

studeo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
Re: Garbage collection & logs
« Reply #8 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.
Logged

studeo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
Re: Garbage collection & logs
« Reply #9 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.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Garbage collection & logs
« Reply #10 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.
Logged

studeo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
Re: Garbage collection & logs
« Reply #11 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.
Logged

gandhi51

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • La Hutte en mousse!
Re: Garbage collection & logs
« Reply #12 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
Logged
Sans douceur, pas de torture ?

studeo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
Re: Garbage collection & logs
« Reply #13 on: September 12, 2006, 04:07:14 pm »

Sept. 11

All log files were deleted again.

Just an update.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.