Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Push notification 推送存折_Push Notification_Apple Push Notifications_Push_Passbook_Apns Php - Fatal编程技术网

Push notification 推送存折

Push notification 推送存折,push-notification,apple-push-notifications,push,passbook,apns-php,Push Notification,Apple Push Notifications,Push,Passbook,Apns Php,我尝试通过图书馆发送存折推送通知 但设备并没有尝试推送我的服务器(所有请求都写在日志中,他是空的) 我不明白怎么了。。。一些想法?它可以有一个缓冲区吗?你填了吗?问题是这个代码工作了三年,证书换了三次,然后在下一次证书换了差不多半年后,推送停止了。我不认为这是什么buffer $config['production'] = DOCROOT . '/my_cert.pm'; $config['entrust'] = DOCROOT . '/entrust_root_certification_au

我尝试通过图书馆发送存折推送通知

但设备并没有尝试推送我的服务器(所有请求都写在日志中,他是空的)


我不明白怎么了。。。一些想法?

它可以有一个缓冲区吗?你填了吗?问题是这个代码工作了三年,证书换了三次,然后在下一次证书换了差不多半年后,推送停止了。我不认为这是什么
buffer
$config['production'] = DOCROOT . '/my_cert.pm';
$config['entrust'] = DOCROOT . '/entrust_root_certification_authority_2048.pem';
$config['passphrase'] = '';
$token = $push_info->push_token;
$text = 'TEST';
$push = new ApnsPHP_Push(
    ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION, $config['production']
);
if ($config['passphrase'] <> '') {
    $push->setProviderCertificatePassphrase($config['passphrase']);
}
$push->setRootCertificationAuthority($config['entrust']);
$message = new ApnsPHP_Message();
$message->addRecipient($token);
$push->connect();
$message->setSound();
$message->setText($text);
$push->add($message);
$push->send();
$push->disconnect();
$aErrorQueue = $push->getErrors();
if (!empty($aErrorQueue)) {
    echo 'Error -  ' . print_r($aErrorQueue, true);
}
Wed, 20 Mar 2019 11:01:16 +0000 ApnsPHP[6467]: INFO: Trying tls://gateway.push.apple.com:2195...
Wed, 20 Mar 2019 11:01:17 +0000 ApnsPHP[6467]: INFO: Connected to tls://gateway.push.apple.com:2195.
Wed, 20 Mar 2019 11:01:17 +0000 ApnsPHP[6467]: INFO: Sending messages queue, run #1: 1 message(s) left in queue.
Wed, 20 Mar 2019 11:01:17 +0000 ApnsPHP[6467]: STATUS: Sending message ID 1 [custom identifier: unset] (1/3): 87 bytes.
Wed, 20 Mar 2019 11:01:18 +0000 ApnsPHP[6467]: INFO: Disconnected.