Edujugon / PushNotification

PHP and Laravel Package to send push notifications to Android and IOS devices.
MIT License
478 stars 159 forks source link

Unable to set local cert chain file #62

Closed allroundexperts closed 6 years ago

allroundexperts commented 6 years ago

Hi, I'm getting this error consistently. Connection problem: stream_socket_client(): Unable to set local cert chain file `/var/www/public_html/niggle/config/iosCertificates/niggle_push.pem'; Check that your cafile/capath settings include details of your certificate and its issuer.

I can connect to apns server when I add -CAfile entrust-2048-ca.cer to the open ssl command on my local environment.Please help.

allroundexperts commented 6 years ago

Don't you think that adding this: stream_context_set_option($ctx, 'ssl', 'cafile', path-to-ca-file) to the apn.php file will solve the issue ?

Edujugon commented 6 years ago

Hi @allroundexperts ,

Could you try to give permissions to your .pem file?

Also, have a look at this post.

Let me know if that helps

allroundexperts commented 6 years ago

Thanks a lot!

Edujugon commented 6 years ago

Happy to know it helped :)