Openssl ubuntu 18.04上的php和ssl

Openssl ubuntu 18.04上的php和ssl,openssl,paypal-sandbox,ubuntu-18.04,php-7.2,Openssl,Paypal Sandbox,Ubuntu 18.04,Php 7.2,运行时,$fp=fsockopen('ssl://www.sandbox.paypal.com“,443,$errno,$errstr,30)我得到一个500内部服务器错误,它完全失败了 运行时,$fp=fsockopen('https://www.sandbox.paypal.com“,443,$errno,$errstr,30)我得到一个异常: 找不到套接字传输“https”-您忘记启用了吗 当您配置PHP时,它会发生什么 当我运行php-I | grep-I openssl时 openss

运行时,
$fp=fsockopen('ssl://www.sandbox.paypal.com“,443,$errno,$errstr,30)我得到一个500内部服务器错误,它完全失败了

运行时,
$fp=fsockopen('https://www.sandbox.paypal.com“,443,$errno,$errstr,30)我得到一个异常:

找不到套接字传输“https”-您忘记启用了吗 当您配置PHP时,它会发生什么

当我运行
php-I | grep-I openssl时

openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1  11 Sep 2018
OpenSSL Header Version => OpenSSL 1.1.1  11 Sep 2018
Openssl default config => /usr/lib/ssl/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
Native OpenSSL support => enabled
好像ssl已正确启用和配置。 在php.ini中,扩展名=…ssl用
注释掉所以我很困惑。我怎样才能从这里开始工作呢

谢谢

添加了SSL的phpinfo输出
ssl://适用于fsockopen,而不是https://

试试ipnpb.sandbox.paypal.com,然后试试curl


ssl://适用于fsockopen,而不是https://

试试ipnpb.sandbox.paypal.com,然后试试curl


我使用的是pdt,而不是ipn,所以我使用了pdt代码并将一些echo作为调试。看起来像$ch=curl_init();被卡住了,甚至一个try/catch都没有触发运行curl-I从ssh显示结果,这意味着curl在那里并且工作。我使用的是pdt而不是ipn,所以我使用pdt代码并将一些echo作为调试。看起来像$ch=curl_init();被卡住了,即使是try/catch也不会触发运行curl-I从ssh显示结果,这意味着curl就在那里并且正在工作