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:
- Stop the Apache service
- Copy libeay32.dll and ssleay32.dll from your ..xampp/php folder to your ..xampp/apache/bin folder, overwriting the older files there
- Edit the ..xampp/apache/bin/php.ini and uncomment the “;extension=php_openssl.dll” (remove the semicolon at the start of the line)
- 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).
thank you for this article!
robert form berlin, germany
Thanks, I’m pleased to know I’ve helped someone.
You helped me too !
thanks
thanks a lot
Well done! I was fooling around moving DLLs to various places for ages. Thanks for posting a clear, definitive answer.
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.
Thanks alot!! You’ve really help me there. I’ve spent a whole day trying to figure this out but this hacked it…
I encountered the same error running WAMP. Your instructions worked perfectly – thanks!
Thanks a lot!! You are a life saver
Many many thanks!!!!
It helps me a lot………..
This article is brilliant and did the trick (I was using WAMP, but the procedure is identical).
Thanks for sharing/posting this information…
Thats cool………
Thanks Mate.
Thank you! This helped me so much!
Keep up the good work
This problem caused me a lot of grief. Thanks for posting the solution!
Thanks from Slovakia! You have helped me a lot!
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…
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).
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.
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
this is the solution that i need. thanks man. from my bottom of the heart