title: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195'
body: <p>I sucessfully run the APNS code in my macbook air, but it turns out that I can not run it in my other computer:</p>
  
  <p>I checked that these are the same:
  1. .pem file ( to be specific )
  2. Program</p>
  
  <p>The computers can not work are:</p>
  
  <p><strong>Windows 7,XAMPP,OpenSSL supported,No firewall</strong></p>
  
  <p>And</p>
  
  <p><strong>EC2 Linux server with 2195 and 2196 opened</strong></p>
  
  <p>What might be other issues causing that I got this error in my php code?</p>
  
  <pre><code>Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195'
  </code></pre>
  
  <p>I know there might be cause by not opening SSL, but I checked the phpInfo(), it should be correct.</p>
  
  <pre><code>openssl 
  
  OpenSSL support enabled 
  OpenSSL Library Version OpenSSL 1.0.1c 10 May 2012 
  OpenSSL Header Version  OpenSSL 0.9.8x
  </code></pre>
  
  <p>I tried telnet in EC2 server, it gives:</p>
  
  <pre><code>telnet gateway.push.apple.com 2195
  Trying 17.149.36.239...
  Connected to gateway.push-apple.com.akadns.net.
  Escape character is '^]'.
  </code></pre>