【问题标题】:push notification connecting error推送通知连接错误
【发布时间】:2011-05-31 14:05:01
【问题描述】:

我正在使用 php 脚本在我的应用程序上推送通知。但在下面一行

$fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);"

在哪里

$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');

我收到如下错误:

警告:stream_socket_client():SSL 操作失败,代码为 1。
OpenSSL 错误消息: 错误:14094416:SSL 例程:SSL3_READ_BYTES:sslv3 警报证书在 /Users/amit/Desktop/NotificationFolder/apns.php 第 29 行中未知

警告:stream_socket_client():无法在第 29 行的 /Users/amit/Desktop/NotificationFolder/apns.php 中启用加密

警告:stream_socket_client():无法连接到第 29 行 /Users/amit/Desktop/NotificationFolder/apns.php 中的 ssl://gateway.sandbox.push.apple.com:2195(未知错误)
连接失败0

有人知道如何解决这个问题吗? 除此之外,一切正常。

【问题讨论】:

标签: php iphone certificate apple-push-notifications


【解决方案1】:

您的证书密码是什么,是否正确给出,您的证书是否真的在 ck.pem 中找到?您是如何创建证书的?

【讨论】:

  • 是的!我已正确输入密码,并且我的证书在我的 ck.pem 中找到。感谢您的帮助,但寻求您的更多帮助。回复
猜你喜欢
  • 2013-09-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-04-04
  • 2014-03-27
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多