Zen Cart Logo
Forums / All Other Contributions/Addons / CAPTCHA not working

CAPTCHA not working

Locked

Views: 1,350

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
17 Feb 2009, 10:59 AM
#1
andymcc77 avatar

andymcc77

New Zenner

Join Date:
Sep 2008
Posts:
20
Plugin Contributions:
0

CAPTCHA not working

Hi,

I have recently installed the CAPTCHA TTF mod on version 1.3.8 and when I visit my contact page, I now get a HTTP 500 error.

Interestingly, if I comment out the following code

if (is_object($captcha) && !$captcha->validateCaptchaCode())) {
$error = true;
$messageStack->add('contact', ERROR_CAPTCHA);
}

from file includes/modules/pages/contact_us/header_php.php
I get my contact page back but the CAPTCHA validation code doesn't work (no surprise)

Anyone have any ideas why this might be ?

Thanks,

Andy

17 Feb 2009, 2:28 PM
#2
andymcc77 avatar

andymcc77

New Zenner

Join Date:
Sep 2008
Posts:
20
Plugin Contributions:
0

Re: CAPTCHA not working

I added a line break and then removed it, with a bit of tweaking it now works, I needed to alter the code in the mod to get the validation to work, code now reads:-

  if (is_object($captcha) && !$captcha->validateCaptchaCode()) {
    $error = true;
    $messageStack->add('contact', ERROR_CAPTCHA);
  }
  
  if ($zc_validate_email and !empty($enquiry) and !empty($name) and !$error) {

:clap: