pir
March 14, 2016, 11:51am
1
Hi,
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?
Thanks!
pir
March 14, 2016, 12:11pm
2
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
Cheers,
Bruno
pir
March 15, 2016, 7:41am
6
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.