php - APNS push not working, and not 'failing', after moving to EC2 instance -


so, moved application ec2 instance, , apple push notification service stopped working. i'm using same certificate, same script, same everything.

  • i've opened port 2195 in security group ec2 instance.
  • from ec2 intance, telnet gateway.push.apple.com 2195 works
  • my script receives no errors... gets end, fwrite returns true... yet, receive no push.

things note.

  • my ec2 instance accessed via https old server http, since script running locally, , has nothing apache, don't see why should matter. but, perhaps does, i'm letting know :d

my script:

$streamcontext = stream_context_create(); stream_context_set_option($streamcontext, 'ssl', 'local_cert', $apnscert); $ssl = 'ssl://' . $apnshost . ':' . $apnsport; $apns = stream_socket_client($ssl, $error, $errorstring, 30, stream_client_connect, $streamcontext); if($apns == false){     echo "error: $errorstring";     return false; } $payload['aps'] = array('alert' => $message, 'badge'=>$badge, 'sound' => 'default'); $payload = json_encode($payload);  $apnsmessage = chr(0) . chr(0) . chr(32) . pack('h*', str_replace(' ', '', $device_id)) . chr(0) . chr(strlen($payload)) . $payload; if(fwrite($apns, $apnsmessage)){     return true; } return false; 

i've checked of variables, set.

any appreciated. driving me bonkers :p

turns out giving bad device id. databases different, , stored poorly. :(


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -