DMXzone reCAPTCHA Support

Back to product page Overview » Questions » reCaptcha not working
This topic is locked
Answered

reCaptcha not working

Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Asked 31 Jan 2012 23:04:36

I've purchased & installed this program and the reCaptcha displays correctly but unfortunately the form can be processed without verification. The form also uses Dreamweaver spry text validation.

I've purchased & installed this program and the reCaptcha displays correctly but unfortunately the form can be processed without verification. The form also uses Dreamweaver spry text validation.

20 PEOPLE HAVE THIS QUESTION
I have this question, too!

Official Responses
George Petrov
Official Representative



Since: 04 May 2001
Posts: 4,823


0
Replied 20 Mar 2013 08:43:35

Hi All,

First, sorry that I've missed this topic. It seems it was market as solved.

Next - this is an old topic which we have addressed with a big update of the DMXzone reCaptcha extension Version 1.1, so the code solution is not needed any more.

So please make sure you install the latest version 1,1 first.

Then you can enter your followup url in the DMXzone reCaptcha dialog. After validating Go To field, instead of entering it as form action.

So please try this and preferably on a new created page.

If you still have problems please report to this new topic:

www.dmxzone.com/support/19386/topic/57580/

Greetings,
George

Hi All,

First, sorry that I've missed this topic. It seems it was market as solved.

Next - this is an old topic which we have addressed with a big update of the DMXzone reCaptcha extension Version 1.1, so the code solution is not needed any more.

So please make sure you install the latest version 1,1 first.

Then you can enter your followup url in the DMXzone reCaptcha dialog. After validating Go To field, instead of entering it as form action.

So please try this and preferably on a new created page.

If you still have problems please report to this new topic:

www.dmxzone.com/support/19386/topic/57580/

Greetings,
George

Vulcho Vulev
Official Representative



Since: 03 Oct 2011
Posts: 1,343
Replied 01 Feb 2012 08:51:37
0
Hello Glenn Peters.

Can you provide us with link to your page where you are receiving the problem ?

Take a look also at the following F.A.Q :
Validation Message does not appear

Regards: V.Vulev
Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Replied 01 Feb 2012 19:19:57
0
Vulcho,

Thanks for your reply - please see:

trustydelivery.co.nz/refer_a_friendform_recaptcha.php

Regards,

Glenn.
Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Replied 01 Feb 2012 19:23:09
0
When all fields are correct then page should be directed to:

trustydelivery.co.nz/refer_a_friendform2_recaptcha.php

Regards,

Glenn.
Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Replied 01 Feb 2012 19:35:20
0
Also, the PHP validation code for the rest of the form (FormToEmail by FormToEmail.com) is on trustydelivery.co.nz/refer_a_friendform2_recaptcha.php
Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Replied 01 Feb 2012 20:10:51
0
There is no problem with the reCaptcha itself (see: trustydelivery.co.nz/form_test.php). However complications arrive incorporating reCaptcha into the form that has Dreamweaver spry text validation as well as the ability to send contents to an email address/addresses with FormToEmail.
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 03 Feb 2012 03:38:36
0
Hi I'm also having this problem.
I've put the reCaptcha into my form just above the 'submit' button.
However I also can successfully submit a form if I enter the wrong letters into the box. No validation or error message to 'try again' comes back.

many thanks
Teodor Kuduschiev
Official Representative



Since: 20 Mar 2009
Posts: 5,006
Replied 03 Feb 2012 07:26:52
0
Hello All,

You need to make sure your form is using method="POST" and action="action_url_goes_here" points to your current page!

Your action should not point to another page!
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 03 Feb 2012 07:44:06
0
Correct. My form is using POST and just points to itself.
Vulcho Vulev
Official Representative



Since: 03 Oct 2011
Posts: 1,343
Replied 03 Feb 2012 07:45:56
0
Hello Liz Banbury.

Can you provide us with link to the problem page ?
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 03 Feb 2012 07:50:03
0
And I agree with Glenn. It works fine on its own, but doesn't validate when part of a bigger 'signup' or registration form.
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 06 Feb 2012 07:03:51
0
Hi Just to add the reCaptcha works if other fields in your form are incorrect and need to be amended, but as soon as all the rest of the form is correct then the form will submit even if the reCaptcha wording does not match.
Is there anything in captcha.php I need to tweak?
Vulcho Vulev
Official Representative



Since: 03 Oct 2011
Posts: 1,343
Replied 06 Feb 2012 07:33:01
0
Hello all.

Please note that the recaptcha needs to direct to the page where the extension is installed when the form submits.

QuoteYou need to make sure your form is using method="POST" and action="action_url_goes_here" points to your current page!

Your action should not point to another page!


Liz Banbury did you changed the code according the following F.A.Q. ?

Validation Message does not appear

Can you provide us with link to your page?

Regards: V.Vulev
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 06 Feb 2012 07:43:43
0
Hi Vulcho
I sent you a link to your email (as it has a login on it)
Many thanks for getting back to me. Yes I did look at the FAQ page above.

I do not have a thankyou page though and I don't want to be directed to any page.

Are you saying that for it all to work I need to go to another page?

In my current page I validate: usual text inputs for first name, last name etc. Then some validation for password and email addresses, then if all fields correctly filled in a record is inserted into a database table and the user is sent an email w/activation link in it.

The captcha works unless it is the only thing which has been input incorrectly. Then the whole form submits anyway.

Many thanks for the help. Really appreciate it.
Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Replied 06 Feb 2012 07:45:19
0
Guys I'm back on this in the morning so looks like a bit of catching up! Hope we can sort issues. Regards, Glenn.
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 06 Feb 2012 07:46:00
0
Hi Vulcho

If I view my source this is what I have at the point of insertion:

<script type="text/javascript">var RecaptchaOptions = {theme : "white",lang : "en",tabindex : 0};</script>
<script type="text/javascript" src="www.google.com/recaptcha/api/challenge?k=6Le5Js0SAAAAAA9pEeS4BSEoGTCmJumZ0hUcWp00"></script>
<noscript>
<iframe src="www.google.com/recaptcha/api/noscript?k=6Le5Js0SAAAAAA9pEeS4BSEoGTCmJumZ0hUcWp00" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>
Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Replied 06 Feb 2012 20:20:55
0
My problem is twofold in that the Dreamweaver spry text validation code is in the "refer_a_friendform_recaptcha.php" page (that also has an external javascript file SpryValidationTextField.js), however the code for processing the form (FormToEmail from FormToEmail.com) is in the refer_a_friendform2_recaptcha.php page. The complication here is that the DMXzone reCaptcha needs to point to the current page so a conundrum! So in summing up, if the reCaptcha is entered incorrectly then the error message appears (as it should) but all the other fields are erased. If the whole form is entered correctly then you are directed to "trustydelivery.co.nz/refer_a_friend2_recaptcha.php?" with the error message"Not Found

The requested URL /refer_a_friend2_recaptcha.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at trustydelivery.co.nz Port 80". Can you help please? This is doing my head in! Ideally I would like it to have the same behavior as "www.dmxzone.com/demo/php/reCAPTCHA/index.php" as when I saw this & came across DMXzone reCaptcha I thought it would be perfect for this. Hope it also helps with Liz's situation.

Many Thanks,

Glenn.
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 06 Feb 2012 23:40:42
0
Hi Vulcho

What does this bit of code exactly mean?
if (!isset($mm_abort_edit) || !$mm_abort_edit)

I think if I add a line for reCaptcha, the same as for all my other field validation..i.e. if reCaptcha 'not working' then echo 'error message' otherwise.....continue to insert a record into the database....then this might help?

Many thanks
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 07 Feb 2012 03:33:08
0
So along the lines of all my other validation then I think it will work:

This validation does not seem to work though....

if(!isset($mm_abort_edit) || !$mm_abort_edit) { // and validation is not fine
      // Return Error - Invalid captcha 
       echo '<p class="maintextactive">The validation words entered do not match the images, please try again.<br /></p>';  
	   found_error == "True";
	}

liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 07 Feb 2012 04:13:36
0
OK I'll be a bit more specific....

I have a list of field validations (please see code below) which all work fine.
When I add the reCaptcha - I added a validation for the captcha.
This is because at the moment if the test entered into the captcha is correct, then the form submits, even if other fields are empty or incorrect.

HOw can I stop the form submitting when the captcha is correct but other fields are not correct.

I do now want to go to another page either.

many thanks for the help. really appreciated.

Please see the end bit of some field validations and the recaptcha validation at the end.....

In theory if found_error != 'Yes' then the form won't submit, but it does if the captchas is correct.

if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $reg_email)){  
      // Return Error - Invalid Email  
       echo '<p class="maintextactive">The email you have entered is invalid, please try again.<br /></p>';  
	   found_error == "True";
    }

	if (empty($secA)) {
		echo '<p class="maintextactive">You must choose a security question and answer.<br /></p>';
		found_error == "True";
	}
	
	if(isset($mm_abort_edit) || $mm_abort_edit) { // and validation is not fine
      // Return Error - Invalid captcha 
       echo '<p class="maintextactive">The validation words entered do not match the images, please try again.<br /></p>';  
	   found_error == "True";
	}
	
		   
	 if ((found_error != "True") && ($password1 == $password2))   {
	   


liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 10 Feb 2012 08:32:57
0
p.s. I have added the piece of code you suggest in the 'Validation Message does not appear' link - but the form still submits if the recaptcha is correct but other fields have been incorrectly filled. The validation error messages appear, but the form submits

Please see full code with validation and the recaptcha.
All my validation and the form worked perfectly until I added the recaptcha. I really need some help on this.
Many thanks

if (($reg_agent == "Yes") && empty($reg_license)) {
      // We know $reg_agent is Yes AND $reg_license is blank 
	   echo '<p class="maintextactive">You need to enter a license number.<br /></p>';
	   found_error == "True";
	}	
	
	if (($reg_agent == "Yes") && empty($reg_colicense)) {
      // We know $reg_agent is Yes AND $reg_colicense is blank 
	   echo '<p class="maintextactive">You need to enter your company license number.<br /></p>';
	   found_error == "True";
	}	
		   
	
	if  (strlen($username) <6 ){
		echo '<p class="maintextactive">You must enter a username of at least 6 characters.<br /></p>';
		found_error == "True";
	}
	
	if (empty($reg_lname)) {
		echo '<p class="maintextactive">You must enter a surname.<br /></p>';
		found_error == "True";
	}
	
	
	if (empty($reg_fname)) {
		echo '<p class="maintextactive">You must enter a first name.<br /></p>';
		found_error == "True";
	}
	
	if  (empty($password1)) {
		echo '<p class="maintextactive">You must enter a password of minimum 8 characters.<br /></p>';
		found_error == "True";
	}
	
	if ($password1 != $password2) {
		echo '<p class="maintextactive">Both passwords must match. Please try again.<br /></p>';
		found_error == "True";
	}
	
	if (strlen($password1) <8 ) {
	   echo '<p class="maintextactive">Your password must be a minimum of 8 characters and consist of both letters and numbers.<br /></p>';
	   found_error == "True";
	}
		   
	if (!preg_match('/^[0-9]+$/i', $reg_tel) ) {
		echo '<p class="maintextactive">The number you have entered is invalid. Please use numbers only.<br /></p>';  
	    found_error == "True";
	}

		
	if (strlen($reg_tel) <8 ) {
		echo '<p class="maintextactive">Your telephone number must be a minimum of 8 numbers only.<br /></p>';
	   found_error == "True";
	}
	
	if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $reg_email)){  
      // Return Error - Invalid Email  
       echo '<p class="maintextactive">The email you have entered is invalid, please try again.<br /></p>';  
	   found_error == "True";
    }

	if (empty($secA)) {
		echo '<p class="maintextactive">You must choose a security question and answer.<br /></p>';
		found_error == "True";
	}
	
	if($_SERVER['REQUEST_METHOD'] == "POST" ) { // if form is submitted
 	if (!isset($mm_abort_edit) || !$mm_abort_edit) { // and validation is fine
	 $GoTo = "map.htm"; // redirect to a new page
	 if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
 	$GoTo .= (strpos($GoTo, '?')) ? "&" : "?";
 	$GoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
	 }
	 }
	}

		   
	 if ((found_error != "True") && ($password1 == $password2)  && !$mm_abort_edit)   {
	   
	
      // Make sure someone isn't already registered using this username
      $query = "SELECT * FROM DEV_user_registration WHERE username = '$username'";
      $data = mysqli_query($dbc, $query);
      if (mysqli_num_rows($data) == 0) 
	  {
     
	    // The username is unique, so insert the data into the database
        $query = "INSERT INTO DEV_user_registration
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 10 Feb 2012 08:34:38
0
And my form starts off as follows:

 <form action="signup - Copy.php" method="post" enctype="multipart/form-data">
Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Replied 10 Feb 2012 19:17:11
0
Yes I would like to nail this asap too please! Client is getting a little frustrated... Thanks, Glenn.
Glenn Peters
Newbie



Since: 30 Jan 2012
Posts: 14
Replied 16 Feb 2012 00:47:30
0
Vulcho, I need to get back on to this as still not resolved - can you help please?

Regards,

Glenn.
liz banbury
Newbie



Since: 10 Jul 2011
Posts: 33
Replied 16 Feb 2012 05:05:52
0
Hi Yes I'm still stuck as well.

Many thanks
Mike Hicks
Member



Since: 04 Oct 2002
Posts: 138
Replied 17 Feb 2012 21:52:13
1
I've been "stuck" on this one for several months (since the extension was released) I have decided that this extension is "not ready for prime time" and updated my CAPTCHA module from another extension company and plan to replace ReCAPTCHA with CAPTCHA and will wait for the update to see if it is any better.