gpt4 book ai didi

在 FreeBSD 中从 PHP 5.5 升级后出现 PHP 5.6 错误 "Unable to connect to ssl://"

转载 作者:太空宇宙 更新时间:2023-11-03 13:36:00 25 4
gpt4 key购买 nike

在将 PHP 5.5 升级到版本 5.6 后,我在 Magento 中的付款方式出现问题。

升级后,Magento 1.9 中的支付方式会抛出错误并生成报告(见下文)。

我的支付提供商说支付扩展使用“Zend_Http_Client 传输协议(protocol)”。

任何人都知道升级 PHP 后会导致此问题的原因是什么?

a:5:{i:0;s:56:"Unable to Connect to ssl://api.payson.se:443. Error
#0: ";i:1;s:2213:"
#0 /usr/local/www/apache24/webroot/multistore/lib/Zend/Http/Client.php(1073): Zend_Http_Client_Adapter_Socket->connect('api.payson.se', 443, true)
#1 /usr/local/www/apache24/webroot/multistore/app/code/community/Payson/Payson/Helper/Api.php(1181): Zend_Http_Client->request('POST')
#2 /usr/local/www/apache24/webroot/multistore/app/code/community/Payson/Payson/Model/Method/Abstract.php(126): Payson_Payson_Helper_Api->PaymentDetails('204103')
#3 /usr/local/www/apache24/webroot/multistore/app/code/core/Mage/Sales/Model/Order/Payment.php(1152): Payson_Payson_Model_Method_Abstract->cancel(Object(Mage_Sales_Model_Order_Payment))
#4 /usr/local/www/apache24/webroot/multistore/app/code/core/Mage/Sales/Model/Order/Payment.php(865): Mage_Sales_Model_Order_Payment->_void(true, NULL, 'cancel')
#5 /usr/local/www/apache24/webroot/multistore/app/code/core/Mage/Sales/Model/Order.php(1155): Mage_Sales_Model_Order_Payment->cancel()
#6 /usr/local/www/apache24/webroot/multistore/app/code/community/Payson/Payson/controllers/CheckoutController.php(62): Mage_Sales_Model_Order->cancel()
#7 /usr/local/www/apache24/webroot/multistore/app/code/community/Payson/Payson/controllers/CheckoutController.php(92): Payson_Payson_CheckoutController->cancelOrder('Unable to Conne...')
#8 /usr/local/www/apache24/webroot/multistore/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Payson_Payson_CheckoutController->redirectAction()
#9 /usr/local/www/apache24/webroot/multistore/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('redirect')
#10 /usr/local/www/apache24/webroot/multistore/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /usr/local/www/apache24/webroot/multistore/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#12 /usr/local/www/apache24/webroot/multistore/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#13 /usr/local/www/apache24/webroot/multistore/index.php(83): Mage::run('mystore', 'store')
#14 {main}";s:3:"url";s:26:"/payson/checkout/redirect/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:8:"mystore";}

最佳答案

当使用服务器名称指示 (SNI) 和GeoTrust Global CA 根 ca 时,我可以连接 TLS 1.0(及更高版本)。证书路径按预期验证,您可以在 s_client 中使用 Verify return code: 0 (ok)。您应该在您的配置中确保所有这三个。

基于异常,我们不能从 OpenSSL 的角度说更多,因为它缺少我们需要的细节。也许更熟悉 PHP 或 Magento 的人会识别出问题并为您指出来。

$ wget https://www.geotrust.com/resources/root_certificates/certificates/GeoTrust_Global_CA.pem
...
Saving to: ‘GeoTrust_Global_CA.pem’
...
‘GeoTrust_Global_CA.pem’ saved [1234/1234]

和:

$ openssl s_client -connect api.payson.se:443 -servername api.payson.se:443 -tls1 -CAfile GeoTrust_Global_CA.pem 
CONNECTED(00000003)
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify return:1
depth=1 C = US, O = GeoTrust Inc., CN = GeoTrust SSL CA - G3
verify return:1
depth=0 C = SE, ST = Solna, L = Solna, O = Payson AB, OU = IT, CN = *.payson.se
verify return:1
Server did acknowledge servername extension.
---
Certificate chain
0 s:/C=SE/ST=Solna/L=Solna/O=Payson AB/OU=IT/CN=*.payson.se
i:/C=US/O=GeoTrust Inc./CN=GeoTrust SSL CA - G3
1 s:/C=US/O=Geo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SlCTyTqP9XZOoNvXtI8SWVCs+EW5FdRz4aGOK
IkKQfcwFGFJGGHW7f/8XkNSO6agGFKuc99pWHB6oMAm3Qe1g8G/2+SvNwhphIAYL
/s6NHGLsJ+4/i/543lNCwAWXHqZZw2twhAJm4YNe/agLCH5fvzjyvs6hxXDu7hTW
-----END CERTIFICATE-----
subject=/C=SE/ST=Solna/L=Solna/O=Payson AB/OU=IT/CN=*.payson.se
issuer=/C=US/O=GeoTrust Inc./CN=GeoTrust SSL CA - G3
---
No client certificate CA names sent
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 3236 bytes and written 262 bytes
Verification: OK
---
New, SSLv3, Cipher is ECDHE-RSA-AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
No ALPN negotiated
SSL-Session:
Protocol : TLSv1
Cipher : ECDHE-RSA-AES256-SHA
Session-ID: 514B0000016FC6A78475CFF088BF92B511EA2A593E7A3C21CB7606096400616A
Session-ID-ctx:
Master-Key: 9EF49EC4B639D63B92003016C3456303D688775502D97D6ACD158F3CD64DF08F
F626374D68B7ADD6BF24D222C198129C
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1477375819
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: yes

最后:

$ openssl version
OpenSSL 1.1.0b 26 Sep 2016

关于在 FreeBSD 中从 PHP 5.5 升级后出现 PHP 5.6 错误 "Unable to connect to ssl://",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40231916/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com