Script URL: http://support.pckeyboard.com
Version of script: 2.5.2
Hosting company: self
URL of phpinfo.php: http://support.pckeyboard.com/7sholen8/phpinfo.php
URL of session_test.php: http://support.pckeyboard.com/7sholen8/session_test.php
What terms did you try when SEARCHING for a solution:
Write your message below:
When we have recaptcha enabled, users are unable to submit tickets via the web interface, they receive an error, "Could not open socket". I disable recaptcha and it works just fine.
recaptcha causes socket errors.
Moderator: mkoch227
Re: recaptcha causes socket errors.
This happens because your server has problems connecting to www.google.com to verify API key.
This means either fsockopen function isn't working on the server or there is a DNS issue when looking up www.google.com
You can try changing this code in "inc/recaptcha/recaptchalib.php" from to and see if that helps.
If not you will need to either disable recaptcha or check with your host why PHP fsockopen function can't connect to www.google.com on port 80.
This means either fsockopen function isn't working on the server or there is a DNS issue when looking up www.google.com
You can try changing this code in "inc/recaptcha/recaptchalib.php" from
Code: Select all
define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
Code: Select all
define("RECAPTCHA_VERIFY_SERVER", "74.125.227.48");
If not you will need to either disable recaptcha or check with your host why PHP fsockopen function can't connect to www.google.com on port 80.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: recaptcha causes socket errors.
Actually I found the issue. . . the server was trying to connect on IPV6 and i guess recaptcha is not working with IPv6.
I changed this line
to
I changed this line
Code: Select all
$response = '';
if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
die ('Could not open socket');
Code: Select all
$response = '';
if( false == ( $fs = @fsockopen(gethostbyname($host), $port, $errno, $errstr, 10) ) ) {
die ('Could not open socket');
Re: recaptcha causes socket errors.
You might want to try IP approach as well, so your server doesn't have to do a host by name lookup everytime a captcha is loaded.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools