Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP

venu picture venu · Feb 5, 2010 · Viewed 14.6k times · Source

I'm using wamp to run, but i got this warning at run time:

Warning: fsockopen() [function.fsockopen]: unable to connect to tls://smtp.gmail.com:465 (Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP?) in C:\wamp\www\mail\testemail.php on line 24 Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP?

Answer

Louisvdw picture Louisvdw · Aug 29, 2012

You need to enable SSL/TLS for your Apache/PHP installation. Make sure you have libeay32.dll and ssleay32.dll in your /apache/bin folder. Edit your php.ini file and add

extension=php_openssl.dll

Then restart Apache and your SSL should be loaded.