Open GoogleCodeExporter opened 8 years ago
Here is my patched version of the recaptchalib.php
Original comment by l...@fgiltd.co.uk
on 28 Oct 2008 at 9:10
Attachments:
Why can't fedora 9 handle fsockopen correctly, that seems extremely broken.
Original comment by ben.maurer
on 28 Oct 2008 at 2:57
[deleted comment]
It does it on my CentOS 5.2 (32bit) testing server too, and I installed the LAMP
stack from source (as the yum versions are so old!). Seems to either be a
redhat or
php bug, I have googled it but not seen any answers.
Original comment by l...@fgiltd.co.uk
on 28 Oct 2008 at 4:53
Thank you, this fix has been implemented into WP-reCAPTCHA and will be in the
next
release.
Original comment by jorgepbl...@gmail.com
on 7 Nov 2008 at 11:40
This fix can be dangerous because it does a dns resolution on every page view.
Original comment by ben.maurer
on 8 Nov 2008 at 12:27
Dangerous?
I suppose it would be more efficient to only run the "gethostbyaddr()" just
before it
is used by fsockopen in the function, but for simplicity I just altered the
Constant
as it is at the top of the file.
Original comment by l...@fgiltd.co.uk
on 9 Nov 2008 at 8:52
How about in recaptcha_check_answer, right before the call to
_recaptcha_http_post,
which is the function that calls fsockopen. This way it would only be called
when it
needs to check the answer right?
define("RECAPTCHA_VERIFY_SERVER", gethostbyname('api-verify.recaptcha.net'));
$response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/verify",
Original comment by jorgepbl...@gmail.com
on 9 Nov 2008 at 9:42
Er, in that case I should just make it:
$response = _recaptcha_http_post (gethostbyname('api-verify.recaptcha.net'),
"/verify",
Does that seem fine?
Original comment by jorgepbl...@gmail.com
on 9 Nov 2008 at 9:43
I tested the suggested fix but it still doesn't work. My site is hosted on
aplusnet
bussines hosting plan, but on my local machine everything works perfect.
Original comment by ivannedo...@gmail.com
on 29 Jan 2009 at 10:05
This fix doesn't work for me either. Always getting "Could not open socket"
error.
Original comment by oleg.ana...@gmail.com
on 4 Feb 2009 at 12:20
Hi All,
I'm getting the same error... I have tried the fix, but it doesn't work...
any siggestion???
thanks all
vit
Original comment by FiNa...@gmail.com
on 23 Jun 2009 at 5:23
it fixed the issue for me
Original comment by opsi...@gmail.com
on 14 Jul 2009 at 6:08
I have tried that repatched version and I still get the 'could not open socket'
error.
Original comment by leewal...@gmail.com
on 16 Jul 2009 at 6:19
Using the mediawiki plugin, fix doesn't work for me either...
Original comment by krakout
on 2 Sep 2009 at 8:32
I'm wondering if the server was offline. I just tried this fix and it worked.
Just
for kicks and grins, I changed the code back to the original and it still
worked. I'm
looking at coincidence.
I also found other threads where people changed their keys, which seemed to
work for
some of them. Probably a timing thing. If the server came back on while you were
making your change, you met with success.
Original comment by btaylor@TaylorImages.com
on 29 Oct 2009 at 10:09
I changed my lib to allow the user to continue if the script could not connect.
A
more secure solution would probably be to provide an alternate validation scheme
perhaps by setting $recaptcha_response->is_valid = alternate and checking for
that in
the page script.
Line 80 is now:
/*die ('Could not open socket - reCaptcha');*/ return 'socket error';
Line 184... I wrapped the solution and existing code in an if-else:
if ($response == 'socket error')
{
$recaptcha_response->is_valid = true;
}
else
{
$answers = explode ("\n", $response [1]);
$recaptcha_response = new ReCaptchaResponse();
if (trim ($answers [0]) == 'true') {
$recaptcha_response->is_valid = true;
}
else {
$recaptcha_response->is_valid = false;
$recaptcha_response->error = $answers [1];
}
}
Original comment by btaylor@TaylorImages.com
on 29 Oct 2009 at 10:52
fix didn't work for me too... Still getting the error
Original comment by Dima.No...@gmail.com
on 25 Jun 2010 at 5:53
[deleted comment]
The reCAPTCHA wasn't entered correctly. Go back and try it again.(reCAPTCHA
said: incorrect-captcha-sol)
Original comment by haisanth...@gmail.com
on 30 Jul 2010 at 5:56
Looks like nobody cud solve this damn problem...... i ve tried all the
suggestions to the same result..... "Could not open socket"
Original comment by boog...@gmail.com
on 3 Aug 2010 at 10:17
Can anybody update how to check if fsockopen() is working or not??
Original comment by boog...@gmail.com
on 3 Aug 2010 at 10:19
Are you guys behind a proxy server?
Original comment by jorgepbl...@gmail.com
on 6 Aug 2010 at 8:54
Im having the same problem on an ubuntu 10.04 LAMP and reCaptcha PHP plugin
install.
Ive tried a couple of fixes from above and the problem is still there. Using a
dedicated server from a respectable web hosting company.
The weird thing is, sometimes the errors pops-up, sometimes it doesn't. If the
error pops-up, and try again, there's a chance it'll work. I guess it's about
50/50 each time the script is ran.
Original comment by jako...@gmail.com
on 7 Aug 2010 at 11:43
google, i'll clap your asses!, i've lost 2 hours of my life screwing this
captcha, and it's same socket error...Shame on you!
Original comment by mihaylov...@yandex.ru
on 13 Aug 2010 at 4:37
Am on centos 5.5 and its private domain and I still have the issue with latest
2.9.7. Could someone help..
Original comment by saina...@gmail.com
on 15 Aug 2010 at 5:10
Same problem here on Debian Lenny, up to date system, latest library.
Original comment by wilcobee...@gmail.com
on 16 Aug 2010 at 8:54
you guys are using the plugin downloaded from this website? It's outdated, you
should be using the one from here:
http://wordpress.org/extend/plugins/wp-recaptcha/
Original comment by jorgepbl...@gmail.com
on 16 Aug 2010 at 9:03
The source code of comment 28 looks like a spammer/obscure download. Google,
where is the fix for the original version?
Original comment by wilcobee...@gmail.com
on 20 Aug 2010 at 9:09
I'm having the same issue.
Google or ReCaptcha people. Any clue?
Debian GNU/Linux 5.0 here.
I've tried all of the above solutions, but none gave the optimal result.
Thanks in advance!!
Original comment by estevema...@gmail.com
on 22 Aug 2010 at 12:36
Solved this problem by applying the patch, then linking /etc/resolv.conf to
/etc/httpd/etc/resolv.conf (in fedora) and /etc/apache2/etc/resolv.conf (in
ubuntu...), then restarting apache....
Original comment by lawrence...@gmail.com
on 8 Sep 2010 at 5:02
It seems i am screwed!
Original comment by mse...@gmail.com
on 6 Oct 2010 at 10:54
Although it's been working flawlessly for more than a year, this issue suddenly
appeared... why ?
I really don't know how to solve this because I didn't modify anything in PHP
config. I've also tried fix from #1 without success.
Lawrence, did you get the issue suddenly like I did too or it never worked
before ?
Original comment by rom.se...@gmail.com
on 19 Oct 2010 at 8:31
[deleted comment]
I found a fix to recaptchalib.php v1.11
-in this line:
define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
-replace "www.google.com" with it's IP address.
define("RECAPTCHA_VERIFY_SERVER", "173.194.36.104");
Try to look for the IP address yourself if this one don't work, I'm not sure if
its the same at different locations(?).
Original comment by yoni050...@gmail.com
on 11 Nov 2010 at 6:56
Make sure it isn't the server which is blocking it, I tried all different kinds
of solutions but couldn't get it to work, then simply uploaded it onto another
host, and it worked perfectly.
And use the latest version with
define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
works like a charm
Good luck
Original comment by i.iacopetta@gmail.com
on 12 Nov 2010 at 12:36
I had the same issue. Strangely I solved it by closing the php code after
recaptha section, then immediately reopening it!
Original comment by samphi...@gmail.com
on 28 Nov 2010 at 12:23
actually the problem is back now
Original comment by samphi...@gmail.com
on 29 Nov 2010 at 6:26
I used recaptcha last week for first time and was okay..
but now, get the same problem
Original comment by bro...@gmail.com
on 22 Dec 2010 at 6:53
"Could not open socket" does anyone has the answer for this issue?
Original comment by juanena...@gmail.com
on 22 Dec 2010 at 7:16
I use the server of name: 000webspace.com, this server shows me the message
"Could not open socket. " I do not know. but maybe in the server configuration
can be done, but on my computer "appserv" seems all well and good
Original comment by eduardol...@gmail.com
on 27 Dec 2010 at 5:34
I use the server of name: 000webspace.com, this server shows me the message
"Could not open socket. " I do not know. but maybe in the server configuration
can be done, but on my computer "appserv" seems all well and good
Original comment by eduardol...@gmail.com
on 27 Dec 2010 at 5:35
I think those of us on shared hosting may get this problem because the host
server admin is not allowing us to open sockets. I am using Zymic. There
servers don't allow you to use sockets - so ReCaptcha is not a suitable
solution :(
Original comment by adriandh...@gmail.com
on 1 Jan 2011 at 10:09
Any fix for this? cause i STILL have this problem... :(
Original comment by orenj...@gmail.com
on 4 Jan 2011 at 8:17
For several months reCaptcha is running smoothly and since yesterday I get a
sudden the message "Could not open socket." Does anyone have a solution?
Original comment by ipr.werb...@googlemail.com
on 6 Jan 2011 at 2:13
Me too. It's been has been fine for the last few months and then today it
started happening again. http://commentwars.org/register
Original comment by christop...@gmail.com
on 7 Jan 2011 at 7:12
[deleted comment]
It's not programming problem.
You have to ask network admin..
They have to open port :80
Original comment by behappy....@gmail.com
on 10 Feb 2011 at 12:26
I've seen this port 80 thing mentioned on other forums.
I don't think so.
In my Fedora Core 13 system, I went so far as to take the firewall completely
down and I still get the "Could not open socket".
This problem cropped up on system that was essentially running several months
untouched.
From what I can tell, the problem comes from the system not being able to
resolve a host name (wouldn't it be cool if the error message said that?).
That can happen for a lot of reasons...
Original comment by jrp...@gmail.com
on 23 Mar 2011 at 3:36
I'm using recaptcha-form.1.2.zip downloaded from
http://wordpress.org/extend/plugins/recaptcha-form/ and i'm getting the same
error. I try to use the fix, but doesn't works for me. It's not seem to be a
resolution problem...
Any solutions or new notice this issue?
Original comment by gacca...@gmail.com
on 16 May 2011 at 6:41
Original issue reported on code.google.com by
l...@fgiltd.co.uk
on 28 Oct 2008 at 9:04