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: Config - Logging and Statistics  (Read 4249 times)

0 Members and 1 Guest are viewing this topic.

dbk

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 18
Config - Logging and Statistics
« on: December 16, 2008, 08:41:51 pm »

Kind people, under "View Logs" I have lost one of my favorite Coppermine things, the Security Log.  I have been unable to find a post about it, and would like to know how to get it back.  Thank you.
Logged
Jan

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Config - Logging and Statistics
« Reply #1 on: December 21, 2008, 12:24:54 am »

The security log is being deleted every now and then by the garbage collection.
Logged

dbk

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 18
Re: Config - Logging and Statistics
« Reply #2 on: December 21, 2008, 04:44:50 am »

Thank you for reply.  Is it possible to change settings to maintain this particular log? 
Logged
Jan

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Config - Logging and Statistics
« Reply #3 on: December 21, 2008, 01:42:16 pm »

Edit include/logger.inc.php, find the lines that start with unlink (that's PHP's "delete file" command) and comment out those lines by adding two slashes in front of the line. Example: replace
Code: [Select]
unlink('logs/'.$log['filename']);with
Code: [Select]
// unlink('logs/'.$log['filename']);
Logged

dbk

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 18
Re: Config - Logging and Statistics
« Reply #4 on: December 22, 2008, 04:30:40 am »

I'm sorry.  I have read the manual and looked for threads on my question, and looked through config and admin tools.  I cannot find where you suggest I change the "unlink".  I would like to create and keep a log of IP addresses that succeed and fail to log in.  Please, would you mind directing me there?   Thank you.
Logged
Jan

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Config - Logging and Statistics
« Reply #5 on: December 22, 2008, 01:12:23 pm »

Download the file http://yoursite.tld/your_coppermine_folder/include/logger.inc.php to your PC using your favorite FTP application, edit that file with a plain text editor (notepad.exe is fine), find
Code: [Select]
unlink('logs/'.$log['filename']);and replace with
Code: [Select]
// unlink('logs/'.$log['filename']);. Save your changes, upload the local copy to your webserver (overwriting the version on your webserver with the edited copy).
The edit will make sure that the logs never get deleted at all. Make sure to delete them manually from time to time to make sure they don't get to big.

I would like to create and keep a log of IP addresses that succeed and fail to log in. 
Why? What should be the use of that? The log will get huge and IP addresses don't mean much as they are assigned dynamically. Quite frankly: if you don't have the skills to understand the instructions in my first posting you probably don't have the skills to properly read the logs anyway. No offense meant, but I really think that you should post what your actual issue is instead of posting nebulous rants about IP access data.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 15 queries.