tags:

views:

15

answers:

1

I need to use ftp_ssl_connect() in a script sometimes instead of ftp_connect(), so I read the requirements on php.net and recompiled with OpenSSL support. phpinfo() shows that it is in fact enabled:

openssl

OpenSSL support         enabled
OpenSSL Library Version OpenSSL 0.9.7e-p1 25 Oct 2004
OpenSSL Header Version   OpenSSL 0.9.7e-p1 25 Oct 2004

Yet the function is still undefined. Not exactly sure where to check next. Any ideas would be greatly appreciated. I'm on FreeBSD 6.4 running PHP 5.3.2. Thanks!

+1  A: 

My guess is that while you recompiled PHP with OpenSSL support, the FTP extension is a shared object that was not rebuilt.

Make sure you tell the configure script you want to build the FTP extension.

Artefacto
I think you're on to something here... --enable-ftp was not in my last config string. Trying it now...
pssdbt
Thanks, this got me on the right track to the solution... neither ftp support or openssl were in the config string, but both compiled as shared extensions (via /usr/ports/lang/php5-extensions). Recompiling those shared extensions didn't work like I was hoping, but adding --enable-ftp and --with-openssl-dir=DIR to my php config string did work.
pssdbt