Drupal 6 - Captcha 6.24 - Cron fails to truncate captcha_sessions table -


environment:

drupal 6 captcha 6.24

problem

today module started giving problems. first clue happening through reports > recent log entries . plagued following:

duplicate entry ***** key ******  query:  insert captcha_sessions (uid, sid, ip_address, timestamp,  form_id, solution, status, attempts) values (....)  

as expected, table huge, i'm talking on 25mbs. under impression drupal´s cron in charge of deleting data in table (as logs) when ran. since it's drupal 6 went on poormanscron , had run....but nothing changed.

my temporary solution truncate, manually, said table. bugs me drupal´s cron not doing on own. so, i'm left wondering, chance keep table @ low size custom script server side?

is there need set drupal's cron deletes logs , clears table? since it's drupal 6 i'm listtle lost, because in drupal 7 create cron job.

thank in advance.

edit

this function found in captcha.module file. it's not doing says, table never gets truncated.

function catpcha_cron{    db_query('delete {captcha_sessions} timestamp < %d', time() - 60*60*24); } 

in case needed challenges older timestamp truncated rather older day since table gets quicly filled , don't have space spare. did change function in module in charge of said truncation captcha.module.

function catpcha_cron{    db_query('delete {captcha_sessions} timestamp < %d', time()); } 

ps: upvoted @clive's comment since led me in right path. thanks!


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -