Help me : " incorrect-captcha-sol "

1,725 views
Skip to first unread message

Gary (france)

unread,
Apr 26, 2012, 9:24:36 AM4/26/12
to reCAPTCHA
I work on a little project and I want use reCAPTCHA for my form but I
have a problem, everytime my script return " The reCAPTCHA wasn't
entered correctly. Go back and try it again.(reCAPTCHA said: incorrect-
captcha-sol) ".

I work in local with WAMP and I use a different location for my form
and my php-script and I had to verify the way of location but I dont
find the solution.

=== POST ===

Array
(
[nom] => Eskobar
[prenom] => Patrice
[email] => plo...@plop.pl
[mot_de_passe] => plopice
[conf_mot_de_passe] => plopice
[recaptcha_challenge_field] =>
03AHJ_VutYXQRhX570A0N0XjAgMo7r_p3GiMjZNVwn17K5cvNlCohWFBUThOyX4NOq2OPWW95RvzvHt6eVbAH9kcaxVB-7r3qZnwyLqjBHK7lfDyGz1DQzY4zAKNnLbaZNLkoS65AHPEHxk7pNqbtWyM9SVFOHAo4lGg
[recaptcha_response_field] => coq descepo
)

The reCAPTCHA wasn't entered correctly. Go back and try it again.
(reCAPTCHA said: incorrect-captcha-sol)

PJH

unread,
Apr 26, 2012, 9:33:38 AM4/26/12
to reca...@googlegroups.com
Can you post the php around the statement that's producing that debug?

Include the call to recaptcha_check_answer(), and anything that uses the return value from it.


On Thu, Apr 26, 2012 at 2:24 PM, Gary (france) <gary.b...@gmail.com> wrote:

=== POST ===

Array
(
   [nom] => Eskobar
   [prenom] => Patrice
   [email] => plo...@plop.pl
   [mot_de_passe] => plopice
   [conf_mot_de_passe] => plopice
   [recaptcha_challenge_field] =>
03AHJ_VutYXQRhX570A0N0XjAgMo7r_p3GiMjZNVwn17K5cvNlCohWFBUThOyX4NOq2OPWW95RvzvHt6eVbAH9kcaxVB-7r3qZnwyLqjBHK7lfDyGz1DQzY4zAKNnLbaZNLkoS65AHPEHxk7pNqbtWyM9SVFOHAo4lGg
   [recaptcha_response_field] => coq descepo
)



--
PJH


Gary (france)

unread,
Apr 26, 2012, 9:39:23 AM4/26/12
to reCAPTCHA
require_once('./lib/recaptchalib.php');
$privatekey = "6LerpdASAAAAAD74RE6sFnULzTeALgsod4QMZjyw";
$resp = recaptcha_check_answer($privatekey,
$_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
print_r($_POST);
die ("The reCAPTCHA wasn't entered correctly. Go back and
try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {

PJH

unread,
Apr 26, 2012, 9:44:52 AM4/26/12
to reca...@googlegroups.com
There doesn't appear to be anything wrong with that - can you print_r($resp); and echo $_SERVER["REMOTE_ADDR"];?

Do you have a public URL where it's running?


--
You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
To post to this group, send email to reca...@googlegroups.com.
To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/recaptcha?hl=en.




--
PJH


Gary (france)

unread,
Apr 26, 2012, 9:49:46 AM4/26/12
to reCAPTCHA
ReCaptchaResponse Object
(
    [is_valid] =>
    [error] => incorrect-captcha-sol
)

127.0.0.1

It's in dev in local.

The script of test of recaptcha it works.

Gary (france)

unread,
Apr 26, 2012, 10:32:19 AM4/26/12
to reCAPTCHA
And when I put my project on my server ( http://178.170.115.148/vinothentik/
) the form displays " Input error: Invalid referer ". I think it's
about the key but when I want create a new key, the web site (https://
www.google.com/recaptcha/admin/create) me say
" Oops.
We are having a problem processing your request. Please try again
later. "

PJH

unread,
Apr 26, 2012, 10:35:32 AM4/26/12
to reca...@googlegroups.com


On Thu, Apr 26, 2012 at 3:32 PM, Gary (france) <gary.b...@gmail.com> wrote:
but when I want create a new key, the web site (https://
www.google.com/recaptcha/admin/create) me say
" Oops.
We are having a problem processing your request. Please try again
later. "

Known issue.

Can you try the php script at http://pastebin.com/Cy5FYGgd on 127.0.0.1 and test using http://127.0.0.1/yourscriptname.php. Put any keys you currently have in there.

--
PJH


Gary (france)

unread,
Apr 26, 2012, 10:51:49 AM4/26/12
to reCAPTCHA
it works.

Array
(
[recaptcha_challenge_field] => 03AHJ_VuujnbMxmlT9lKoSmRxPKJcKcDCh-
egFuMcyxP0bUUXNSvdjsx1lK1fOxO6E-
UMaLQyRRtrkteRjEgJYCCKcTsyPdE2NRT92OktRqq40qpc6G1FTJaR8Ey7mishSsCZakF3BYhwsVL0ZD0hW-
ilcM5PyU2akkA
[recaptcha_response_field] => aselog 232/2
)
ReCaptchaResponse Object
(
[is_valid] => 1
[error] =>
)
Array
(
[HTTP_HOST] => localhost
[HTTP_CONNECTION] => keep-alive
[CONTENT_LENGTH] => 230
[HTTP_CACHE_CONTROL] => max-age=0
[HTTP_ORIGIN] => http://localhost
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1) AppleWebKit/
535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8
[HTTP_REFERER] => http://localhost/recaptcha-php-1.11/test.php
[HTTP_ACCEPT_ENCODING] => gzip,deflate,sdch
[HTTP_ACCEPT_LANGUAGE] => fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
[HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
[HTTP_COOKIE] => PHPSESSID=i6bep14po3sdgm7vv8rers64l0
[PATH] => C:\Program Files\NVIDIA Corporation\PhysX\Common;C:
\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows
\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows
\System32\WindowsPowerShell\v1.0\;C:\Program Files\Windows Live
\Shared;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:
\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Go\bin;
[SystemRoot] => C:\Windows
[COMSPEC] => C:\Windows\system32\cmd.exe
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
[WINDIR] => C:\Windows
[SERVER_SIGNATURE] =>
[SERVER_SOFTWARE] => Apache/2.2.21 (Win32) PHP/5.3.8
[SERVER_NAME] => localhost
[SERVER_ADDR] => 127.0.0.1
[SERVER_PORT] => 80
[REMOTE_ADDR] => 127.0.0.1
[DOCUMENT_ROOT] => C:/wamp/www/
[SERVER_ADMIN] => admin@localhost
[SCRIPT_FILENAME] => C:/wamp/www/recaptcha-php-1.11/test.php
[REMOTE_PORT] => 3514
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /recaptcha-php-1.11/test.php
[SCRIPT_NAME] => /recaptcha-php-1.11/test.php
[PHP_SELF] => /recaptcha-php-1.11/test.php
[REQUEST_TIME] => 1335451712
)

PJH

unread,
Apr 26, 2012, 10:59:33 AM4/26/12
to reca...@googlegroups.com


On Thu, Apr 26, 2012 at 3:51 PM, Gary (france) <gary.b...@gmail.com> wrote:
it works.

I'm at a loss then - it's doing very little different to what your's was.

--
PJH


Gary (france)

unread,
Apr 26, 2012, 12:28:02 PM4/26/12
to reCAPTCHA
I find the problem, it's about my copy / paste, in my function I used
an array who had data of $_POST.

Thank you for me to have help.

Bonne journée !
Reply all
Reply to author
Forward
0 new messages