coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: dbk on December 16, 2008, 08:41:51 PM

Title: Config - Logging and Statistics
Post by: dbk 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.
Title: Re: Config - Logging and Statistics
Post by: Joachim Müller on December 21, 2008, 12:24:54 AM
The security log is being deleted every now and then by the garbage collection.
Title: Re: Config - Logging and Statistics
Post by: dbk on December 21, 2008, 04:44:50 AM
Thank you for reply.  Is it possible to change settings to maintain this particular log? 
Title: Re: Config - Logging and Statistics
Post by: Joachim Müller 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: replaceunlink('logs/'.$log['filename']);with// unlink('logs/'.$log['filename']);
Title: Re: Config - Logging and Statistics
Post by: dbk 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.
Title: Re: Config - Logging and Statistics
Post by: Joachim Müller 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 unlink('logs/'.$log['filename']);and replace with// 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.

Quote from: dbk on December 22, 2008, 04:30:40 AM
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.