Shot put

I have a PHP script located in a path like /var/www/vhosts/hostname/httpdocs/webservices, I have PHP script files and .pem, and I correctly named the file .pemin the script, but still when I run the script, I do not receive a push notification, instead I get warnings, such as:

Warning: stream_socket_client() [function.stream-socket-client]: Unable to set local cert chain file `ck_push_test.pem'; Check that your cafile/capath settings include details of your certificate and its issuer in /var/www/vhosts/ipartyapps.com/httpdocs/webservices/testPush.php on line 12

Warning: stream_socket_client() [function.stream-socket-client]: failed to create an SSL handle in /var/www/vhosts/ipartyapps.com/httpdocs/webservices/testPush.php on line 12

Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable crypto in /var/www/vhosts/ipartyapps.com/httpdocs/webservices/testPush.php on line 12

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Unknown error) in /var/www/vhosts/ipartyapps.com/httpdocs/webservices/testPush.php on line 12
Failed to connect 0

I double-checked all the paths, permissions, and the owner / group of script files and .pemstill not receiving push notifications.

Any suggestions, please, as urgent.

+5
source share
2 answers

, , .pem , script, .PHP .

.

$location = "file.pem";

$location = dirname(__FILE__)."/file.pem";

, ?

+1

, pem? (, , ?)

pem , , .

-----BEGIN CERTIFICATE-----
<certificate details>
-----END CERTIFICATE-----
-----BEGIN ENCRYPTED PRIVATE KEY-----
<private key>
-----END ENCRYPTED PRIVATE KEY-----

, pem

+1

All Articles