PayPal IPN OPENSSL error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

旧巷老猫 提交于 2019-12-24 02:06:16

问题


My Current PHP version is 5.3. Recently I have updated it 5.2 to 5.3

I have searched in google I can't find any solution regarding the PayPal IPN validation.

I saw my phpinfo() there are enabled OPenSSL but still I am getting this error message -

Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure in /home/xxx/public_html/paypal_test/socketopen.php on line 5

Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /home/xxx/public_html/paypal_test/socketopen.php on line 5

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://www.sandbox.paypal.com:443 (Unknown error) in /home/xxx/public_html/paypal_test/socketopen.php on line 5
()

My Code is -

<?php
$fp = fsockopen ( 'ssl://www.sandbox.paypal.com', "443", $err_num, $err_str, 60);
if (!$fp) {
    echo "$errstr ($errno)<br />\n";
} else {
    $out = "GET / HTTP/1.1\r\n";
    $out .= "Host: www.sandbox.paypal.com\r\n";
    $out .= "Connection: Close\r\n\r\n";
    fwrite($fp, $out);
    while (!feof($fp)) {
        echo fgets($fp, 128);
        echo "<br>";
    }
    fclose($fp);
}
?>

I have used same code in different server this code is working fine. But this is not working in my own server. Please check below two screenshot-

Actual Output -

My output -

I read php-paypal-error: 14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure But not getting any exact solution for that. Please check and let me know.

Thank you.


回答1:


According to SSLLabs this server only supports TLS 1.2, i.e. no TLS 1.1, TLS 1.0 or SSL 3.0.

My Current PHP version is 5.3. Recently I have updated it 5.2 to 5.3

Given that you are using a fairly old version of PHP chances are high that you are also using an older version of OpenSSL. The necessary support for TLS 1.2 was only added with OpenSSL version 1.0.1. To find out which version you are using you might use

 php -r 'printf("0x%x\n", OPENSSL_VERSION_NUMBER);'

This should return at least 0x10001000 (i.e. version 1.0.1). Anything below has no support for TLS 1.2.



来源:https://stackoverflow.com/questions/35030756/paypal-ipn-openssl-error14077410ssl-routinesssl23-get-server-hellosslv3-aler

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!