Enable SSL in PHP fsockopen()

泄露秘密 提交于 2019-12-10 20:42:40

问题


I am using PHP fsockopen() to finalize a payment between my server and PayPal. However, when I try to use an SSL connection, I get this error:

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://:443 
(Unable to find the socket transport "ssl" - did you forget to enable 
it when you configured PHP?)

I am sure that my call to the fsockopen() method is correct, as it worked correctly before I upgraded PHP on my development server.

It is important that this connection is encrypted, so I can't work around this.

I can't find any config about fsockopen() SSL connections in my php.ini file. Could anyone direct me to it?

Thank you for your help,
spryno724


回答1:


It means that either your SSL module wasn't compiled with the rest of the PHP or it was compiled but its not enabled via the php.ini ..

Starting point: see what phpinfo() says about ssl ?




回答2:


What OS are you using? If a *nix platform, PHP was likely compiled without SSL support. If its Windows, I'd check to make sure the SSL module is enabled in php.ini



来源:https://stackoverflow.com/questions/5494376/enable-ssl-in-php-fsockopen

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