APNS PHP スクリプトを実行していますが、正常に動作していますが、1 つのファイルで PHP エラーがスローされ、修正方法を知りたいです。
次のエラーが表示されます。
/usr/bin/php -f /usr/share/nginx/www/processFeedback.php
<br/>Started processing FeedbackPHP Notice: Trying to get property of non-object in /usr/share/nginx/www/processFeedback.php on line 46
PHP Warning: stream_socket_client(): unable to connect to (Failed to parse address "") in /usr/share/nginx/www/classes/Apns.php on line 66
PHP Notice: Undefined variable: errstrn in /usr/share/nginx/www/classes/Apns.php on line 69
PHP Fatal error: Uncaught exception 'Exception' with message '<br/>Failed to connect 0 ' in /usr/share/nginx/www/classes/Apns.php:69
Stack trace:
#0 /usr/share/nginx/www/classes/Apns.php(49): Apns->connect()
#1 /usr/share/nginx/www/processFeedback.php(46): Apns->__construct(NULL, 'certificates/ck...', 'passwd')
#2 {main}
thrown in /usr/share/nginx/www/classes/Apns.php on line 69
46 行目:
$apns = new apns($server->ServerUrl, $certificatePath, $certificate->Passphrase);
66 行目:
$this->stream = stream_socket_client($this->server, $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);
69 行目:
throw new Exception("<br/>Failed to connect $err $errstrn");
DataService.php: https://github.com/bortuzar/PHP-Mysql---Apple-Push-Notification-Server/blob/master/classes/DataService.php
APNS.php: https://github.com/bortuzar/PHP-Mysql---Apple-Push-Notification-Server/blob/master/classes/Apns.php
私は PHP の専門家ではないので、何が足りないのでしょうか?