Welcome Guest, Not a member yet? Register   Sign In
ApnsPHP and CodeIgniter
#1

[eluser]LiorBroshi[/eluser]
Hi there

I'm trying to implement ApnsPHP into codeigniter and i'm getting the same error(s) over and over again:

Warning: stream_socket_client() [function.stream-socket-client]: Unable to set verify locations
Warning: stream_socket_client() [function.stream-socket-client]: failed to create an SSL handle
Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable crypto

Can't seem to understand whats causing these issues...

BTW - When i'm working with ApnsPHP as a standalone lib outside codeigniter, everything works fine and push notifications are sent with ease.

Any ideas?
#2

[eluser]LiorBroshi[/eluser]
Problem solved, for some reason you need to inject absolute path (C:/, /var/www...) for the certificates to be used within ApnsPHP. Works like a charm.
#3

[eluser]Unknown[/eluser]
Hi, how are you including the ApnsPHP library inside your CodeIgniter project?

Whenever I try to include the ApnsPHP Autoload.php file I get conflicts with CI's internal autoloading.
#4

[eluser]LiorBroshi[/eluser]
You have a loading function inside Autoload.php which trying to load the CI_Exception class and gives an error, just bypass that by adding
Code:
if ($sFile == 'CI_Exception') { return; }
If you cant make it work i'll check the actuall code, I just gave this as an example.




Theme © iAndrew 2016 - Forum software by © MyBB