Fixing SSL for XAMPP installs

Recently I had to fix a bug/oversight in the xampp install that prevented ssl from being a registered stream socket transport, it turns out there are quite a lot of requests for help on this subject out there but few or no answers. I stumbled into this problem when I tried to setup SSL encrypted email by way of google’s SMTP servers and if by putting my solution here I help just one person then it is worth it.

The common error message that you will get when trying to do an SSL transport on a default XAMPP install is: “Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?”
The solution it turns out is quite obvious, but maybe not so much when you are sleep deprived and multitasking, what you need to do is:

  1. Stop the Apache service
  2. Copy libeay32.dll and ssleay32.dll from your ..xampp/php folder to your ..xampp/apache/bin folder, overwriting the older files there
  3. Edit the ..xampp/apache/bin/php.ini and uncomment the “;extension=php_openssl.dll” (remove the semicolon at the start of the line)
  4. Start the Apache service

If you now check your phpinfo() page you will see Registered Stream Socket Transports: tcp, udp, ssl, sslv3, sslv2, tls and everything will now be working.

******EDIT*******

After updating to the latest version of xampp (1.7.7) it appears the problem still exists, the php.ini file to edit now exists in the ../xampp/php directory, you need to add “extension=php_openssl.dll” in there. No other steps are required (apart from the obvious restart of apache).

Leave a comment ?

26 Comments.

  1. thank you for this article! :-) robert form berlin, germany

  2. Thanks, I’m pleased to know I’ve helped someone.

  3. You helped me too !
    thanks

  4. thanks a lot :)

  5. Well done! I was fooling around moving DLLs to various places for ages. Thanks for posting a clear, definitive answer.

  6. Not sure if this is because I’m using an newer version of XAMPP, but all I needed to do to use ssl (https://localhost/site.file.php) was add a security exception to firefox.

  7. Thanks alot!! You’ve really help me there. I’ve spent a whole day trying to figure this out but this hacked it…

  8. I encountered the same error running WAMP. Your instructions worked perfectly – thanks!

  9. Thanks a lot!! You are a life saver

  10. Many many thanks!!!!
    It helps me a lot………..

  11. This article is brilliant and did the trick (I was using WAMP, but the procedure is identical).

    Thanks for sharing/posting this information…

  12. Thats cool………
    Thanks Mate.

  13. Thank you! This helped me so much!

    Keep up the good work :D

  14. This problem caused me a lot of grief. Thanks for posting the solution!

  15. Thanks from Slovakia! You have helped me a lot!

  16. Hello.. I don’t have any php.ini in bin folder .. i have in /php folder so now what changes in which file is required…

  17. After updating to the latest version of xampp (1.7.7) it appears the problem still exists, the php.ini file to edit now exists in the ../xampp/php directory, you need to add “extension=php_openssl.dll” in there. No other steps are required (apart from the obvious restart of apache).

  18. Jagannath Samanta

    Its working well. Thanks you. But I want to say something the in the third step xampp/apache/bin/php.ini the path will be xampp/php/php.ini

    Thanks again. :)

  19. Jagannath Samanta
    thanks for the comment, but you should have read the original post. It was updated at the start of the year to include the new directory location. Also, the comment I made upon discovering XAMPP’s directory changes is directly above yours and contains the exact same information :)

  20. this is the solution that i need. thanks man. from my bottom of the heart

  21. Thanks very much. It really really helps me a lot. May I ask, how about working in LAMPP? Thanks!

  22. :razz: Thank you! You really saved me from the hell!! After I turned on the extension option in php.ini, my php script did request to Google server. And I made “$myPhpMailerInstance.SMTPDebug = 1″, then I could see the ‘understandable’ debugging feedback from Google server.

  23. hello brother my xampp version 1.8.1 but I have faced some problem when i send mail by localhost they said this error
    Message: fsockopen(): unable to connect to ssl://smtp.googlemail.com:443 (Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?)

    please any one help me to solve this solution…
    I apply above follow post but again apace can’t start….

  24. :razz: Thanks alot… Namibia

  25. YEAH!!! Works perfectly. Thanks a bunch!!

  26. Thanks for da solutions.. osem dude +1

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>