Error Using PHP for iPhone APNS(为 iPhone APNS 使用 PHP 时出错)
问题描述
我从用于向 APNS 发送消息的 PHP 代码中收到此错误消息...有没有人遇到过同样的问题?
I have been getting this error messages from my PHP code used to send message to the APNS...has anyone got faced the same issue?
Warning: stream_socket_client() [function.stream-socket-client]: SSL operation
failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:
SSL3_READ_BYTES:sslv3 alert handshake failure in
/Library/WebServer/Documents/anish/apns/2.php on line 8
Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable
crypto in /Library/WebServer/Documents/anish/apns/2.php on line 8
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect
to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /Library/WebServer
/Documents/anish/apns/2.php on line 8
Failed to connect: 0
Warning: fclose(): supplied argument is not a valid stream resource in
/Library/WebServer/Documents/anish/apns/2.php on line 20*
而且似乎总是无法连接到 gateway.sandbox.push.apple.com.我什至尝试过 PushMeBaby,但它也无法连接到 gateway.sandbox.push.apple.com
Also it seems it always fails to connect to gateway.sandbox.push.apple.com. I even tried with PushMeBaby and it too fails to connect to gateway.sandbox.push.apple.com
推荐答案
问题显然与证书的安装有关.如果证书安装正确,那么一切都很好,就像魅力一样..!
the problem apparently was with the installation of certificates. If the certificate are installed properly, then everything works great like a charm..!
这篇关于为 iPhone APNS 使用 PHP 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为 iPhone APNS 使用 PHP 时出错
基础教程推荐
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- PHP 守护进程/worker 环境 2022-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- HTTP 与 FTP 上传 2021-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01