I've been working through Ray Wenderlich's tutorials on push notifications using a PHP Script.
I have done a ton of research but I have ran into an issue on part 2 where you run the push.php file using the ck.pem file.
/Applications/XAMPP/bin/php push.php development
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert PushChatCert.pem -key PushChatKey.pem
$this->fp = stream_socket_client('ssl://' . $this->server, $err, $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
Okay, I finally figured this out! After 2 days of working with this.
So, for anyone else who runs into this issue:
Download the entrust_2048_ca.cer certificate from: https://www.entrust.com/get-support/ssl-certificate-support/root-certificate-downloads/
Scroll down and get the Entrust.net Certificate Authority (2048)
Then, in the push.php file, after you set the context for the passphrase, add this line:
stream_context_set_option($ctx, 'ssl', 'cafile', 'entrust_2048_ca.cer');