Ojs recaptcha proxy problem?

I have enabled recaptcha, I can see the recaptcha in the register form but when I try to register a new user and I send the form I get:

Could not open socket

If I disable recaptcha all works fine. I’m still debugging but seems a problem with fsockopen behind a proxy, any help?


Definitely it was a proxy problem,
Here I found a fix: http://robertmarkbramprogrammer.blogspot.com.es/2012/03/using-proxy-with-authentication-in-php.html

It works but I’m trying to get the proxy host and port variables from the config.inc.php, as now I have hardcoded them.

Hi @pir,

You can always get any config.inc.php setting using the OJS Config class. Something like this should work:

$proxyUsername = Config::getVar('proxy', 'proxy_username'); $proxyPassword = Config::getVar('proxy', 'proxy_password');

I didn’t tested, but I think that it should work inside the recaptchalib.inc.php


yes it works @beghelli

This was all ready answered here reCaptcha doesn't support proxy configuration - #5 by knjigor

thanks @knjigor, this should be fixed.
Hoping if someone here with more experience makes a fix, if not I will try, at the end it’s only to apply an If clause looking if you have use_proxy enabled.