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?
Earlier versions of Windows, such as Windows 7 or Windows Server 2012, don't enable TLS 1.1 or TLS 1.2 by default for secure communications using WinHTTP. For these earlier versions of Windows, install Update 3140245 to enable the registry value below, which can be set to add TLS 1.1 and TLS 1.2 to the default secure protocols list for WinHTTP.
When enabling TLS 1.2 for your Configuration Manager environment, start by ensuring the clients are capable and properly configured to use TLS 1.2 before enabling TLS 1.2 and disabling the older protocols on the site servers and remote site systems. There are three tasks for enabling TLS 1.2 on clients: Update Windows and WinHTTP
By default in Windows, this value is 0x0A0 to enable SSL 3.0 and TLS 1.0 for WinHTTP. The above example keeps these defaults, and also enables TLS 1.1 and TLS 1.2 for WinHTTP.
If you want to completely disable SSL 3.0 and TLS 1.0, use the SChannel disabled protocols setting in Windows. For more information, see Restrict the use of certain cryptographic algorithms and protocols in Schannel.dll. Ensure that TLS 1.2 is enabled as a protocol for SChannel at the operating system level TLS 1.2 is enabled by default.
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.
If you're using WAMP on Windows you can left click on the green W in the notifications pane.
Then goto: PHP -> PHP Extensions -> php_openssl
Once you do that WAMP should auto restart and everything should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With