Disable all unnecessary log data

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
calande
Posts: 70
Joined: Sat Sep 02, 2006 7:01 am

Disable all unnecessary log data

Post by calande »

I was looking at a phpMyFAQ DB that got very big. The .sql file took a while to open in Kate, and there was a huge amount of junk (adminlogs, access logs, captcha info...) I removed everything but I'd like to know how to disable these logs so that it doesn't fill up again :roll:
Thanks,
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
I suppose you're running PMF 1.6.6, let's see each of the tables:
  1. faqadminlog, go to the Edit configuration page and uncheck the use Adminlog? entry;
  2. faqsessions, go to the Edit configuration page and uncheck the use Tracking? entry;
  3. faqcaptcha, on each captcha image hit we remove data older than 1 week: you could tweak this setting opening the inc/captcha.php file, searching for the generateCaptchaCode() function and changing the call to the internal garbage collector to read the line below:

    Code: Select all

            $this->garbageCollector(86400);
    in order to clear data older than 1 day.
Regards,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
calande
Posts: 70
Joined: Sat Sep 02, 2006 7:01 am

Post by calande »

Thank you Matteo! :wink:
dicks
Posts: 39
Joined: Mon Oct 09, 2006 2:48 pm

Post by dicks »

Hi,

Setting it in the configuration is one thing, how do I now flush the admin entries (and others)?

Bye

DickS
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
dicks wrote:Setting it in the configuration is one thing
That was the question of the user ;)
dicks wrote:how do I now flush the admin entries (and others)?
Tables:
  1. faqadminlog, you need to drop records manually;
  2. faqsessions, you can drop them on month-basis directly from PMF and the code will drop both records and traking data files;
  3. faqcaptcha, you don't need to drop them: just wait for the next captcha image hit.
Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
dicks
Posts: 39
Joined: Mon Oct 09, 2006 2:48 pm

Post by dicks »

Hi,

On (1), why not add a button to phpmyfaq to drop the tables ;)?

Cheers!

DickS
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
dicks wrote:On (1), why not add a button to phpmyfaq to drop the tables ;)?
the "button" is already in the incoming PMF 2.0.0-beta: 1.6.x is features frozen, only bugs and security fixes will be addressed.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
dicks
Posts: 39
Joined: Mon Oct 09, 2006 2:48 pm

Post by dicks »

8)

Looking forward to 2.0 then. Any idea when it will be out of beta?
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
dicks wrote:Looking forward to 2.0 then. Any idea when it will be out of beta?
Short: When it will be ready ;)

A bit longer: We're trying to release it within the first half of December but nothing has been written to the stone. Please, track our devblog for being updated about progress and issues of 2.0.0-beta

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Post Reply