immobiliare/ApnsPHP

Passbook. Trouble with push-notification

Opened this issue · 1 comments

When I send a push, gives the following:

   Thu, 19 Nov 2015 14:24:53 +0300 ApnsPHP[5908]: INFO: Trying tls://gateway.push.apple.com:2195... 
Warning: stream_socket_client(): Unable to set verify locations `./entrust_2048_ca.cer' `(null)' in C:\OpenServer\domains\stas\darkvss\vendor\ApnsPHP\Abstract.php on line 394

Warning: stream_socket_client(): failed to create an SSL handle in C:\OpenServer\domains\stas\darkvss\vendor\ApnsPHP\Abstract.php on line 394

Warning: stream_socket_client(): Failed to enable crypto in C:\OpenServer\domains\stas\darkvss\vendor\ApnsPHP\Abstract.php on line 394

Warning: stream_socket_client(): unable to connect to tls://gateway.push.apple.com:2195 (Unknown error) in C:\OpenServer\domains\stas\darkvss\vendor\ApnsPHP\Abstract.php on line 394
Thu, 19 Nov 2015 14:24:53 +0300 ApnsPHP[5908]: ERROR: Unable to connect to 'tls://gateway.push.apple.com:2195': (0) Thu, 19 Nov 2015 14:24:53 +0300 ApnsPHP[5908]: INFO: Retry to connect (1/3)...

The code

require_once './vendor/ApnsPHP/Autoload.php';

$push = new ApnsPHP_Push(
    ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION,
    './cert.pem'
);
$push->setProviderCertificatePassphrase('pass_for_cert');
$push->setRootCertificationAuthority('./entrust_2048_ca.cer');
$push->connect();
$message = new ApnsPHP_Message('87d0ef0518*******25c99d234ebc14b11820');
$message->setCustomIdentifier("Message-Badge-3");
$message->setText('');
$message->setSound();
$message->setExpiry(30);
$push->add($message);
$push->send();
$push->disconnect();
$aErrorQueue = $push->getErrors();
if (!empty($aErrorQueue)) {
    var_dump($aErrorQueue);
}

How to solve a problem ? What can be a problem at all? For three days, I suffer with this problem = (

I am also having same issue