I have used the php script from the well known Ray Wanderlich tutorial to send push notifications during development phase. They were triggered properly after I created the
if you running the file from the command line maybe try to give the full path to the ck.pem file
change the line : stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
to
stream_context_set_option($ctx, 'ssl', 'local_cert', '/path/to/your/file/ck.pem');
work for me