gavla / apns-php

Automatically exported from code.google.com/p/apns-php
0 stars 0 forks source link

ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195 #37

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Hello
I'm trying to use apnsphp .I've implemented my push code from the example of 
APNSPHP push sample.
However when I try to send a push notification message it says unable to 
connect ssl://gateway.sandbox.push.apple.com:2195 .

What is the expected output? What do you see instead?

Wed, 05 Dec 2012 01:26:34 +0530 ApnsPHP[31164]: INFO: Trying 
ssl://gateway.sandbox.push.apple.com:2195... Wed, 05 Dec 2012 01:26:35 +0530 
ApnsPHP[31164]: ERROR: Unable to connect to 
'ssl://gateway.sandbox.push.apple.com:2195': (0) Wed, 05 Dec 2012 01:26:35 
+0530 ApnsPHP[31164]: INFO: Retry to connect (1/3)... Wed, 05 Dec 2012 01:26:36 
+0530 ApnsPHP[31164]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195... 
Wed, 05 Dec 2012 01:26:36 +0530 ApnsPHP[31164]: ERROR: Unable to connect to 
'ssl://gateway.sandbox.push.apple.com:2195': (0) Wed, 05 Dec 2012 01:26:36 
+0530 ApnsPHP[31164]: INFO: Retry to connect (2/3)... Wed, 05 Dec 2012 01:26:37 
+0530 ApnsPHP[31164]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195... 
Wed, 05 Dec 2012 01:26:37 +0530 ApnsPHP[31164]: ERROR: Unable to connect to 
'ssl://gateway.sandbox.push.apple.com:2195': (0) Wed, 05 Dec 2012 01:26:37 
+0530 ApnsPHP[31164]: INFO: Retry to connect (3/3)... Wed, 05 Dec 2012 01:26:38 
+0530 ApnsPHP[31164]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195... 

What version of the product are you using? On what operating system?

the product version: apnsPHP-r100,

operating system: windows 7

Please provide any additional information below.

i am using code

require_once 'ApnsPHP/Autoload.php';

$push = new ApnsPHP_Push(ApnsPHP_Abstract::ENVIRONMENT_SANDBOX, 
'pIpeMediaPNSSLCertificateSigningRequest.certSigningRequest');

$push->connect();

$message = new ApnsPHP_Message(str_replace(' ', '', 
'753497da89e12eec87ae21add4c2e461b80319630515384a2525262d5331c40d'));

$message->setText('push via ApnsPHP');

$message->setSound();

$message->setBadge(1);

$message->setCustomProperty('deviceToken', 
'753497da89e12eec87ae21add4c2e461b80319630515384a2525262d5331c40d');

$message->setCustomIdentifier('753497da89e12eec87ae21add4c2e461b80319630515384a2
525262d5331c40d');

$message->setExpiry(30);

$push->add($message);

$push->send();

$push->disconnect();

$errors = $push->getErrors();

Original issue reported on code.google.com by shaik.am...@gmail.com on 4 Dec 2012 at 2:43

GoogleCodeExporter commented 8 years ago
Any update on this issue.. seems many are facing this problem...

Original comment by hussuli...@gmail.com on 22 Feb 2013 at 1:45

GoogleCodeExporter commented 8 years ago
indeed..why isn't this working ...most have followed the directions to the 
letter.

Original comment by RalphThe...@gmail.com on 2 May 2013 at 6:23

GoogleCodeExporter commented 8 years ago
I encountered this problem some time ago, and was related with expired 
certificates (if you get it working and stops working, check that you are using 
valid certificates).

Original comment by luis.tut...@gmail.com on 11 Dec 2014 at 1:00