Cant Send Messages

479 views
Skip to first unread message

meticulo

unread,
Feb 27, 2012, 7:17:19 PM2/27/12
to Easy APNs
This is our error, the proper ports are opened and the devices are set
to development in the database.

Warning: stream_socket_client() [function.stream-socket-client]:
Unable to set private key file `/home/ryantuck/public_html/EasyAPN/
ck.pem' in /home/ryantuck/public_html/EasyAPN/classes/class_APNS.php
on line 450

Warning: stream_socket_client() [function.stream-socket-client]:
failed to create an SSL handle in /home/ryantuck/public_html/EasyAPN/
classes/class_APNS.php on line 450

Warning: stream_socket_client() [function.stream-socket-client]:
Failed to enable crypto in /home/ryantuck/public_html/EasyAPN/classes/
class_APNS.php on line 450

Warning: stream_socket_client() [function.stream-socket-client]:
unable to connect to ssl://gateway.sandbox.push.apple.com:2195
(Unknown error) in /home/ryantuck/public_html/EasyAPN/classes/
class_APNS.php on line 450

Notice: Failed to connect to APNS: 0 . 1) APNS::processQueue -> File:
test.php (line 97) 2) APNS::_fetchMessages -> File: class_APNS.php
(line 969) 3) APNS::_pushMessage -> File: class_APNS.php (line 385) 4)
APNS::_triggerError -> File: class_APNS.php (line 455) in /home/
ryantuck/public_html/EasyAPN/classes/class_APNS.php on line 559

Warning: fclose() expects parameter 1 to be resource, boolean given
in /home/ryantuck/public_html/EasyAPN/classes/class_APNS.php on line
468

Warning: stream_socket_client() [function.stream-socket-client]:
Unable to set private key file `/home/ryantuck/public_html/EasyAPN/
ck.pem' in /home/ryantuck/public_html/EasyAPN/classes/class_APNS.php
on line 485

Warning: stream_socket_client() [function.stream-socket-client]:
failed to create an SSL handle in /home/ryantuck/public_html/EasyAPN/
classes/class_APNS.php on line 485

Warning: stream_socket_client() [function.stream-socket-client]:
Failed to enable crypto in /home/ryantuck/public_html/EasyAPN/classes/
class_APNS.php on line 485

Warning: stream_socket_client() [function.stream-socket-client]:
unable to connect to ssl://feedback.sandbox.push.apple.com:2196
(Unknown error) in /home/ryantuck/public_html/EasyAPN/classes/
class_APNS.php on line 485

Notice: Failed to connect to device: 0 . 1) APNS::processQueue ->
File: test.php (line 97) 2) APNS::_fetchMessages -> File:
class_APNS.php (line 969) 3) APNS::_pushMessage -> File:
class_APNS.php (line 385) 4) APNS::_checkFeedback -> File:
class_APNS.php (line 470) 5) APNS::_triggerError -> File:
class_APNS.php (line 487) in /home/ryantuck/public_html/EasyAPN/
classes/class_APNS.php on line 559

Warning: fread() expects parameter 1 to be resource, boolean given
in /
home/ryantuck/public_html/EasyAPN/classes/class_APNS.php on line 488

Warning: fclose() expects parameter 1 to be resource, boolean given
in /home/ryantuck/public_html/EasyAPN/classes/class_APNS.php on line
497

meticulo

unread,
Feb 27, 2012, 8:47:59 PM2/27/12
to Easy APNs
I got it working, the issue was that I was trying to send the commands
via a webbrowser. I got it working in the console by typing "php
test.php" and it prompted me the enter the password for the PEM file.
However, since this is going to use cron job, where would I put the
password text and how would I enter it?

John Jones

unread,
Feb 28, 2012, 12:21:36 PM2/28/12
to easy...@googlegroups.com
Normally you remove the password from the PEM files, then the password issue is avoided.

> --
> You received this message because you are subscribed to the Google
> Groups "Easy APNS" group.
> To post to this group, send email to easy...@googlegroups.com
> To unsubscribe from this group, send email to
> easyapns+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/easyapns?hl=en

meticulo

unread,
Feb 28, 2012, 12:32:16 PM2/28/12
to Easy APNs
I would prefer to keep the password for security reasons. Where would
I add the code to enable it.

John Jones

unread,
Mar 1, 2012, 5:04:33 AM3/1/12
to easy...@googlegroups.com
not something i have ever done as your pem file should be on your server in a secure location, so its not accessible from external locations.

meticulo

unread,
Mar 1, 2012, 5:36:29 AM3/1/12
to Easy APNs
ok that soubds fine. How would I remove the password from the pem
file?
Reply all
Reply to author
Forward
0 new messages