I\'m having trouble with using APNS with PHP and getting the following message:
stream_socket_client(): Failed to enable crypto
The problem
I have this problem because I foolishly forgot to include the file extension (.pem) when supplying the file path for local_cert.
In my case, the issue was with my mac (OSX Sierra). I uploaded php and cert to my server, ran it, and the notification was delivered.