【发布时间】:2010-12-01 16:09:27
【问题描述】:
我尝试使用本地 mac 机器运行,但出现以下错误
Warning: stream_socket_client() [function.stream-socket-client]: Unable to set private key file `/Applications/XAMPP/xamppfiles/htdocs/apns/apns-dev.pem’ in /Applications/XAMPP/xamppfiles/htdocs/apns/apns.php on line 9
Warning: stream_socket_client() [function.stream-socket-client]: failed to create an SSL handle in /Applications/XAMPP/xamppfiles/htdocs/apns/apns.php on line 9
Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable crypto in /Applications/XAMPP/xamppfiles/htdocs/apns/apns.php on line 9
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /Applications/XAMPP/xamppfiles/htdocs/apns/apns.php on line 9
Warning: socket_close() expects parameter 1 to be resource, boolean given in /Applications/XAMPP/xamppfiles/htdocs/apns/apns.php on line 11
Warning: fclose() expects parameter 1 to be resource, boolean given in /Applications/XAMPP/xamppfiles/htdocs/apns/apns.php on line 12
我获得了从其他机器生成的 PEM 证书,
所以我很困惑我现在要做什么。
请让我知道我需要做什么才能在 localhost 中运行它
【问题讨论】:
-
我有同样的问题,我可以在我的本地 XAMPP 服务器上运行。但它没有在我的外部服务器中运行。
-
嗨 Biranchi,请咨询您的托管服务提供商,将端口列入白名单,这将解决您的问题
标签: php macos openssl apple-push-notifications