ID:               36103
 Updated by:       [EMAIL PROTECTED]
 Reported By:      rebe at unit01 dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         FTP related
 Operating System: linux
 PHP Version:      5.1.2
 New Comment:

Which linux is it?


Previous Comments:
------------------------------------------------------------------------

[2006-01-20 16:52:31] rebe at unit01 dot net

It is an CLI script running as root user:

debian:/var/www/test# ./ftptls.php

Warning: ftp_login(): SSL/TLS handshake failed in
/var/www/test/ftptls.php on line 4

Warning: ftp_login(): AUTH TLS successful in /var/www/test/ftptls.php
on line 4
login failed

now lftp connection:
debian:/var/www/test# lftp
lftp :~> open 192.168.10.120
lftp 192.168.10.120:~> login admin qwerty
lftp [EMAIL PROTECTED]:~> pwd
ftp://admin:[EMAIL PROTECTED]
lftp [EMAIL PROTECTED]:~> ls
drwxrwxr-x  35 ftp      ftp          4096 Jan 16 16:22 .
drwxrwxr-x  35 ftp      ftp          4096 Jan 16 16:22 ..
lftp [EMAIL PROTECTED]:/>

Server (proftpd on second machine) is configured with options:
TLSRSACertificateFile /etc/embedos/ftp/ftpserver.cert.cert
TLSRSACertificateKeyFile /etc/embedos/ftp/ftpserver.cert.key
TLSVerifyClient off
TLSEngine on
TLSProtocol TLSv1
TLSRequired on

SSL is required. TO test it i did ftp'ing with non-ssl client:
debian:/var/www/test# ftp 192.168.10.120
Connected to 192.168.10.120.
220 Ethernus FTP Server
Name (192.168.10.120:root): admin
550 SSL/TLS required on the control channel
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

------------------------------------------------------------------------

[2006-01-20 16:38:20] [EMAIL PROTECTED]

Test as the user as you run your webserver with.
Or try with PHP CLI.

------------------------------------------------------------------------

[2006-01-20 16:08:56] rebe at unit01 dot net

OK I said ftp server is configured OK, and I checked connection using
lftp client program.

So it is required to configure something special on php side to get
this working? PHP is compiled with ftp and openssl support ofcoz.

------------------------------------------------------------------------

[2006-01-20 15:58:38] [EMAIL PROTECTED]

You need to figure out why you get this first: "SSL/TLS handshake
failed". Most likely badly configured system.


------------------------------------------------------------------------

[2006-01-20 15:32:30] rebe at unit01 dot net

Description:
------------
Ftp ssl/tls connection fails after login function. I checked on ftp
client program supporting ssl (lftp) and everything works fine there.
Server is linux Proftpd 1.3.0

Reproduce code:
---------------
$conn_id = ftp_ssl_connect('192.168.10.120');
$lr = ftp_login($conn_id,'login','pass');
if ($lr) {
echo ftp_pwd($conn_id)."\n";
} else {
echo "login failed\n";
}
ftp_close($conn_id);


Expected result:
----------------
/

Actual result:
--------------
Warning: ftp_login(): SSL/TLS handshake failed in /test.php on line 8

Warning: ftp_login(): AUTH TLS successful in /test.php on line 8

login failed



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36103&edit=1

Reply via email to