I'm running Apache 2.2.13 and PHP 5.2.12. Just installed PHP 5.2.12 by hand (to get access to all extensions) and enabled OpenSSL. phpinfo() signifies OpenSSL is enabled and running OpenSSL .9.8k 25 Marly 2009.
I am getting this error: PHP Fatal error: Call to undefined function ftp_ssl_connect().
I have seen in which the PHP manual indicates 'ftp_ssl_connect() is just available if both ftp module and also the OpenSSL support is made statically into php' and additional states that 'you must compile your personal PHP binaries' to really make it use Home windows.
I've the suspicion that phpinfo() only signifies OpenSSL to be 'enabled' because I've uncommented the road 'extension=php_openssl.dll' and also have the correct dlls within the correct folders and also the correct path within the atmosphere variables. And possibly a static build into PHP should be accomplished no matter what phpinfo() signifies.
In my opinion the goal of distribution (as referred to above) is perfect for dynamic extensions, but recompiling (for OpenSSL) would be to scribe a static extension.
ftp extension is working fine (included in PHP 5.2). I test this using the following code:
$conn_id = ftp_connect($url) $login_result = ftp_login($conn_id, $username, $password) ftp_close($conn_id)
Observe that to check on ssl, I just have to change ftp_connect with ftp_ssl_connect. When reaching this line, I recieve the PHP error above during my Apache error log file.
Because the documentation states (estimating that which you already cited) :
Note: Why this function might not exist
ftp_ssl_connect()is just available if both ftp module and the OpenSSL support is made statically into php, which means that on Home windows this function is going to be undefined within the official PHP develops.
To create this function available on Home windows you have to compile your personal PHP binaries.
You say you installed PHP "by hand" but this most likely still means you used an "official" build from php.internet -- and that means you haven't put together your personal PHP binaries... So, that function isn't available.
There's no miracle : it appears you will need to re-compile PHP, while using right configuration options at compile-time, if you wish to have the ability to use that function...
Here's some documentation about this : Build your own PHP on Windows -- but... best of luck... i have never heard it had been "simple" to compile PHP on home windows, really (it isn't very difficult on Linux, but Linux is maybe a little more suitable if this involves compilation)
A few other solutions :
- switching to Linux for the developments (even when it's only utilizing a Virtual Machine) -- but you'll probably still need to recompile PHP to obtain that (is probably not enabled automatically)
- simply not by using their function in the end, are you aware in case your hosting service provides you with it ? (If you cannot apply it to your production server, you don't need to experience your development/testing machine)