Windows上的PHP open_ssl,ftp_ssl_connect

I have a function in php that needs to connect to ftp using ftp_ssl_connect. Iam using windows seven and as per the answers from google I need to rebuild the php to include the ssl functions. Now my question if is there a way to enable ssl on Windows without rebuilding php? Or is there a donwloadable version where ssl already included for windows?

thanks

From PHP doc:

Note: Why this function may not exist

ftp_ssl_connect() is only available if both the ftp module and the OpenSSL support is built statically into php, this means that on Windows this function will be undefined in the official PHP builds. To make this function available on Windows you must compile your own PHP binaries.

Emphasis mine.


However, I've downloaded PHP binary for windows from official php.net and I noticed there's a specific DLL (ext/php_openssl.dll) for openssl. It means maybe it's not necessary rebuild PHP in order to get openssl working. Just remember add an entry for the dll in php.ini file. It should be something like this:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "ext"

...
extension=php_openssl.dll

NOTE

I haven't tested the above case.

As of PHP 7.0, the core FTP extension on Windows is by default built with OpenSSL support. In the earlier PHP versions, while SSL support is possible, it is not provided with the standard builds for various reasons. The only solution for PHP 5 is to make a custom build of PHP, while the standard PHP 7.0 builds on windows.php.net provide the ftp_ssl_connect() function.

Thanks.