[Php] Fix my recaptcha

SpaceshipSpaceship
Watch
Status
Not open for further replies.

liam_d

The original NP Emo KidEstablished Member
Impact
25
Looking for someone to fix my recaptcha implementation on my forum.

Will pay a quick $10 via paypal to whoever does it.

Basically recaptcha works on register, making a topic etc etc everywhere but the quickreply which always states it is wrong, i can't figure out why since it works on the main reply page just not the quick reply.

Test here: Prxa.info Message Board >> Viewing a topic >> dfsd

Download the code here: http://www.prxa.info/archives/Upload.tar.gz
(if you want the sql file to fully install and test let me know)

You can see snippets of the actual code here: http://ubuntuforums.org/showpost.php?p=7307883&postcount=3 (i have tried to get help there too before).

Main Code is in the files "newreply.php" and "includes/captchas/recaptcha.php"
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
Not got enough time at the moment to go through the code and fix the error, but by the looks if it this is your issue:

Code:
 else if ($site_config['captcha_engine'] == 'recaptcha')

You are checking here using the $site_config variable; however on the page you submit to there is this error:

Code:
 Notice: Undefined variable: site_config in /home/prxainfo/public_html/area51/includes/class_post_parser.php on line 69

This would suggest to me that the variable $site_config has not been initialised in this file (perhaps a misssing include() statement?) which would explain away the issue you are having.

Hope this helps.
 
0
•••
That only happens on the error page, if it wasnt defined before it wouldn't give you an error since it wouldn't know that it has to go to the recaptcha section, so that can't be the problem.
 
0
•••
Ok, I have sorted the problem:
Your API key do not match.
There is an extra space at the end in the $privatekey variable which in turn adds "%20" to your API key.

Take off the extra space and it should work (I guess :gl:).

---------------------------------------
Moreover you said the validation is working fine while registering but I see for "register.php" you are using your own captcha validation "captcha pxb" (and not the recaptcha validation)

Hope this helps.

Also remember reporting this recaptcha error earlier in your "Np$ incentives thread"
 
Last edited:
0
•••
"http://www.prxa.info/area51/register.php" When viewing it, recaptcha shows up not the pxb captcha, if you are looking on the main site then yes it will show up but thats not where the work is being done.

I have taken out the extra space but it still doesn't work. I have donated 30NP to you.

Really wish i could figure this one out :(
 
0
•••
ok, yes I checked the register.php in the home page.
Thanks for the np$.
Still not working?
Try outputting the result of "$resp" and see what it shows.
 
0
•••
The error it gives out "The CAPTCHA solution was incorrect." Even though it has been entered in right, also after taking out spaces it no longer works on the main reply page, this is getting annoying heh.
 
0
•••
Did you make any changes?
I see that now it passes out that recaptcha validation.
But outputs the error on Line 287 and 290 where you try to set cookie + redirect to "viewtopic.php?tid={$topic}" because of the preceding errors.
Undefined variable - site_config and Undefined index - site_url etc.

If you take care of these errors, it should work the way you expected.

PS: Although the poster is not taken to the expected page, the posts are getting added to your forum.
 
Last edited:
0
•••
The recaptcha is fixed now but unfortunately it errors out not because of the undefined bits they don't matter likei said before, it errors out because of the "headers already sent" which i'm not sure how to fix.
 
0
•••
Since the error messages are already sent to your browser (PHP Error Notices), it is not possible to send header info or cookies after that.

You should either turn off the error notices or rectify the Undefined variable problem.
 
0
•••
Hah your right turning it off made it work, good stuff :)
 
0
•••
Status
Not open for further replies.
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Spaceship
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back