captcha errors?

Has anyone else seen the following while trying to post a comment?

"Fatal error: Call to undefined function captchaexception() (great big long thingy omitted)

If you have, could you drop me an email (the address is over there on the left, sorta). It’s a bit weird, it’s saying the code you’re sending isn’t for a valid comment. Hm.


OK, it should be sorted now. The problem was first a dodgy line throwing the exception (missed out the ‘new’, doh), but primarily an over-efficient caching algorithm, leading to the following sequence of events:

  • Someone looks at post number N
  • Post N’s code is generated, along with a captcha for it and an ID code for that captcha
  • Post number N is then cached, along with the captcha ID
  • Someone posts a comment, so that captcha ID is marked as used
  • Someone else looks at the post, loading the data – and the (now out of date) captcha ID – out of the cache, and tries to post a comment
  • The captcha server reports a ‘stale ID’ error, as it should.

There are some weirdnesses of the caching system that mean it still might behave oddly, though. Hm. Haven’t got time to look at it properly now, so keep me posted.

For Mel

Mel, your email address keeps giving me SMTP permanent failure error 550 (mailbox unavailable). But you were trying to post comments while I was fucking about with the code online, something you should never do but the little laptop with the offline version running on it is elsewhere.

Copyright © Found
Jim Finnis' personal blog

Built on Notes Blog Core
Powered by WordPress