2013-04-17 12:25
浏览 308


I sucessfully run the APNS code in my macbook air, but it turns out that I can not run it in my other computer:

I checked that these are the same: 1. .pem file ( to be specific ) 2. Program

The computers can not work are:

Windows 7,XAMPP,OpenSSL supported,No firewall


EC2 Linux server with 2195 and 2196 opened

What might be other issues causing that I got this error in my php code?

Unable to connect to 'ssl://'

I know there might be cause by not opening SSL, but I checked the phpInfo(), it should be correct.


OpenSSL support enabled 
OpenSSL Library Version OpenSSL 1.0.1c 10 May 2012 
OpenSSL Header Version  OpenSSL 0.9.8x

I tried telnet in EC2 server, it gives:

telnet 2195
Connected to
Escape character is '^]'.

图片转代码服务由CSDN问答提供 功能建议

我在我的macbook air中成功运行了APNS代码,但事实证明我无法在我的其他代码中运行它 电脑:

我检查过它们是一样的: 1。 .pem文件(具体) 2。 程序


Windows 7,XAMPP,支持OpenSSL,无防火墙

打开2195和2196的EC2 Linux服务器

其他可能是什么 导致我在我的PHP代码中出现此错误的问题?

 <  / code>  


 <  code> openssl 
OpenSSL库版本OpenSSL 1.0.1c 2012年5月10日
OpenSSL标题版本OpenSSL 0.9.8x 

我在EC2中尝试过telnet 服务器,它给出:

  telnet 2195 
Trying ... 
连接到  。
  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • duansao20000508 2013-04-26 10:08

    Thanks for help, so far I solved the solution.

    The problem is that I used the same pem file for both my cert and the root cert.

    There is a root cert that is different from my own cert, during connection, both cert is used so I have to get the root cert of apple push notification.


    解决 无用
    打赏 举报
  • dpnfjx755573 2013-04-17 12:27
    1. if you are getting an error like this "Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?" then follow the next step

    2. if php has not got ssl enabled then goto php.ini and change this to ";extension=php_openssl.dll" "extension=php_openssl.dll" (remove the semicolon) and save it and run the program.

    解决 无用
    打赏 举报
  • dsl36367 2014-06-03 09:28

    In case of MAC, (built-in server was working fine using terminal but not through browser, for me, so i installed MAMP.)

    1.Go to---> /Library/WebServer/Documents/----copy both php and ckdev.pem file here.

    2 go to terminal-->$open /private/etc-->go to--->apache2>originals>httpd.config file--> **"#LoadModule php5_module libexec/apache2/", remove "#"..(perhaps, you would have to change the permission also..!)

    then goto browser and check--> localhost/yourPhpFile.php

    In Case of Windows system,

    1.Install WAMP,

    2.goto php.ini file--->search for this ";extension=php_openssl.dll" line and remove semicolon ";". WAMP icon from right-bottom goto PHP>PHP Extensions>select php_openssl..

    That's it..hope this may help further seekers.

    解决 无用
    打赏 举报

相关推荐 更多相似问题