Where should I put the .pem files for ApnsPHP to work?

2.7k Views Asked by At

I have my two files entrust_root_certification_authority.pem and server_certificates_bundle_sandbox.pem, but I'm not sure where I should put them. I get this error :

Fatal error: Uncaught exception 'ApnsPHP_Exception' with message 'Unable to read certificate file 'server_cerificates_bundle_sandbox.pem'' 
1

There are 1 best solutions below

1
On BEST ANSWER

This example contains an error, the name of file in sample_push.php is wrong 'server_cerificates_bundle_sandbox.pem', correct name is 'server_certificates_bundle_sandbox.pem'. Only for tests, you can put pem files in root directory of your apns site. I had the same problem, but now it works fine.

Good luck.