如何使用流stream_socket_client()在aruba中打开ssl连接

发布于 2024-12-21 12:25:06 字数 441 浏览 2 评论 0原文

我正在用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城旧梦 2024-12-28 12:25:06

您需要 OpenSSL 扩展,其中 您可能需要重新编译/重新安装 PHP,具体取决于您的平台 - 因为这似乎是 Windows,您只需运行安装程序再次,然后在“扩展”屏幕上选择 OpenSSL。

除非您的 PHP 实例具有 OpenSSL 扩展,否则许多流包装器 - SSLTLSHTTPS 等不可用。 请参阅此处了解详细信息。

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, and HTTPS, amongst others, are not available unless your PHP instance has the OpenSSL extension. See here for details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文