如何使用流stream_socket_client()在aruba中打开ssl连接
我正在用 php 开发一个服务器端来为苹果发送推送通知。我在一些指南上看到我必须创建一个使用 ssl 苹果服务器进行调用的stream_socket_client()。
当我启动脚本时,我收到一条消息:
Warning: stream_socket_client() [function.stream-socket-client]:
unable to connect to ssl://gateway.sandbox.push.apple.com:2195
(Unable to find the socket transport "ssl" -
did you forget to enable it when you configured PHP?)
in D:\Inetpub\webs\XXX\push.php on line 7
我能做什么?必须启用某些功能吗?请帮助我!
i'm developing a server side in php to send push notification for apple. i see on some guides that i have to create a stream_socket_client() calling with ssl apple's servers.
When i launch my script i receive that message:
Warning: stream_socket_client() [function.stream-socket-client]:
unable to connect to ssl://gateway.sandbox.push.apple.com:2195
(Unable to find the socket transport "ssl" -
did you forget to enable it when you configured PHP?)
in D:\Inetpub\webs\XXX\push.php on line 7
What can i do? do have to enable something ? help me pls!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要 OpenSSL 扩展,其中 您可能需要重新编译/重新安装 PHP,具体取决于您的平台 - 因为这似乎是 Windows,您只需运行安装程序再次,然后在“扩展”屏幕上选择 OpenSSL。
除非您的 PHP 实例具有 OpenSSL 扩展,否则许多流包装器 -
SSL
、TLS
和HTTPS
等不可用。 请参阅此处了解详细信息。You need the OpenSSL extension for which you will probably need to recompile/reinstall PHP, depending on your platform - since this appears to be Windows, you just need to run the installer again, and select OpenSSL on the "extensions" screen.
Many stream wrappers -
SSL
,TLS
, andHTTPS
, amongst others, are not available unless your PHP instance has the OpenSSL extension. See here for details.