Sending iOS notification through a php script: 'Unable to set private key file'

后端 未结 7 1598
囚心锁ツ
囚心锁ツ 2021-01-06 00:49

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

7条回答
  •  心在旅途
    2021-01-06 00:58

    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');

    to

    stream_context_set_option($ctx, 'ssl', 'local_cert', '/path/to/your/file/ck.pem');

    work for me

提交回复
热议问题