I’m once again working on trying to get ftp_ssl_connect working. Server I’m trying to connect to is CentOS v6.2. FTP daemon is vsftpd. Filezilla can connect just fine, and because of that, I just wonder why PHP isn’t doing the same. Both dev server and remote server have self signed certs. Any ideas? I’ve spent hours scouring the internet, and read countless pages of info related to vsftpd and ftp_ssl_connect.
Do you have OpenSSL enabled in PHP? Does it give you a Warning or Error when it tries to make the connection? If yes, post it here.
Yes, OpenSSL is enabled, and vsftpd was compiled against it. I’ve tried numerous ssl_ciphers in vsftpd because FileZilla required ssl_ciphers=HIGH, but I really don’t need FileZilla to work, I need PHP to work. My vsftpd.conf looks like any from various tutorials found online. All of the appropriate SSL related options have been set. In most cases, I’ve gone out of my way to make the options allow just about any kind of connection, because I just need it to work. I’m wondering if there is some sort of difference with php because my dev machine is Windows. Although OpenSSL is clearly enabled and working for everything else, maybe FTP doesn’t like it?
Errors:
Warning: ftp_login() [function.ftp-login]: SSL/TLS handshake failed in C:\xampp\htdocs\script-library\connectivity\connectivity.php on line 72
Warning: ftp_login() [function.ftp-login]: Proceed with negotiation. in C:\xampp\htdocs\script-library\connectivity\connectivity.php on line 72