Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Can't send Messages to Apple Push Notification Server

Discussion in 'General Discussion' started by huailin, Aug 20, 2011.

  1. huailin

    huailin Registered

    Aug 20, 2011
    Likes Received:
    Trophy Points:

    Pls help if you happen had this issue before.

    I migrated my system yesterday, and uploaded all the files. When testing, realized that the my php codes could NOT send ssl-sockets messages to Apple Push server. It worked perfect on my local server here. Does Apple remember my local server IP when i register the Push Notification service? I did not remember they did this.

    $apnsHost = '';
    b$apnsPort = 2195;
    $apnsCert = 'apns-dev.pem';

    $streamContext = stream_context_create();
    stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert);

    $apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice