1

i'm developing a server side in php to send push notification for apple. i see on some guides that i have to create a stream_socket_client() calling with ssl apple's servers.

When i launch my script i receive that message:

Warning: stream_socket_client() [function.stream-socket-client]:
unable to connect to ssl://gateway.sandbox.push.apple.com:2195
(Unable to find the socket transport "ssl" -
did you forget to enable it when you configured PHP?)
in D:\Inetpub\webs\XXX\push.php on line 7

What can i do? do have to enable something ? help me pls!

Jayyrus
  • 12,961
  • 41
  • 132
  • 214

1 Answers1

1

You need the OpenSSL extension for which you will probably need to recompile/reinstall PHP, depending on your platform - since this appears to be Windows, you just need to run the installer again, and select OpenSSL on the "extensions" screen.

Many stream wrappers - SSL, TLS, and HTTPS, amongst others, are not available unless your PHP instance has the OpenSSL extension. See here for details.

DaveRandom
  • 87,921
  • 11
  • 154
  • 174
  • @JackTurky Who/what is aruba hosting? A company or a platform? – DaveRandom Dec 18 '11 at 20:38
  • @JackTurky I am a little surprised that a professional hosting company do provide OpenSSL support in their PHP build - I suggest you contact them and tell them what you are trying to do, they may be able to able adjust the settings of your account to provide it. If they cannot do this I suggest you look for a better host, as this is a fairly basic requirement in this day and age. – DaveRandom Dec 19 '11 at 09:53
  • can you suggest me some host? – Jayyrus Dec 19 '11 at 14:39
  • Unfortunately no - all the stuff I ever do is hosted on my company's own boxes - but I know that [1and1](http://1and1.com) are popular (my girlfriend uses them regularly and has no real complaints). Really I would suggest [shopping around on Google](http://www.google.com/search?q=php+web+hosting) and make sure you talk the hosts before you buy, explain to them exactly what you want to do, to make sure they provide/allow all the services you need and they are the right fit for you. One thing I do know is that the cheapest option is probably not the best one. – DaveRandom Dec 19 '11 at 14:50
  • thanks you very much! in first i will contact aruba ( my hosting provider ) and i try to do something with them, after i follow your suggest ;) – Jayyrus Dec 19 '11 at 20:19