apache|php升级后导致apns服务不可用

由于安全问题我们将apache和php的版本进行了升级,apache从apache-2.4.10升级到了apache-2.4.20 php从5.6.0升级到了5.6.4,之后就开始报错了,报错信息如下:

[Tue Apr 19 12:17:14.520250 2016] [:error] [pid 17766:tid 1303021888] PHP Warning:  stream_socket_client(): Failed to enable crypto in /opt/app/apache-2.4.20/htdocs/iossender/apns/lib/APNotification.class.php on line 278

[Tue Apr 19 12:17:14.520349 2016] [:error] [pid 17766:tid 1303021888] PHP Warning:  stream_socket_client(): unable to connect to ssl://gateway.push
.apple.com:2195 (Unknown error) in /opt/app/apache-2.4.20/htdocs/iossender/apns/lib/APNotification.class.php on line 278
[Tue Apr 19 12:17:29.451896 2016] [proxy:error] [pid 17795:tid 1240271168] (70007)The timeout specified has expired: AH00957: HTTP: attempt to connect to 211.136.93.48:80 (*) failed
[Tue Apr 19 12:17:29.451984 2016] [proxy_http:error] [pid 17795:tid 1240271168]  AH01114: HTTP: failed to make connection to backend: 211.136.93.48
[Tue Apr 19 12:17:31.330882 2016] [proxy:error] [pid 17795:tid 1145862464] (70007)The timeout specified has expired: AH00957: HTTP: attempt to connect to 211.136.93.48:80 (*) failed
[Tue Apr 19 12:17:31.330921 2016] [proxy_http:error] [pid 17795:tid 1145862464] AH01114: HTTP: failed to make connection to backend: 211.136.93.48
[Tue Apr 19 12:17:33.456868 2016] [proxy:error] [pid 17686:tid 1336916288] (70007)The timeout specified has expired: AH00957: HTTP: attempt to connect to 211.136.93.48:80 (*) failed
[Tue Apr 19 12:17:33.456938 2016] [proxy_http:error] [pid 17686:tid 1336916288] AH01114: HTTP: failed to make connection to backend: 211.136.93.48
[Tue Apr 19 12:17:52.795618 2016] [proxy:error] [pid 17686:tid 1200548160] (70007)The timeout specified has expired: AH00957: HTTP: attempt to connect to 211.136.93.48:80 (*) failed



解决办法:

1. 下载CA验签证书:https://www.entrust.net/downloads/binary/entrust_ssl_ca.cer

该证书会在每次向苹果服务器发送消息时都会访问验证,如果本地存在就不需要去远端访问了。

2. 修改 config.inc.php ,加载CA证书
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值