ID:               31971
 Updated by:       [EMAIL PROTECTED]
 Reported By:      frantisek at augusztin dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         FTP related
 Operating System: Linux (Fedora Core 3)
 PHP Version:      5CVS, 4CVS (2005-05-18)
 Assigned To:      iliaa
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2005-11-02 13:30:34] frantisek at augusztin dot com

Patch for PHP 5.0 CVS :

--- ext/ftp/ftp.c       17 Mar 2005 17:16:49 -0000      1.103.2.7
+++ ext/ftp/ftp.c       2 Nov 2005 12:22:31 -0000
@@ -281,6 +281,8 @@
                                return 0;
                        }

+                       SSL_CTX_set_options(ctx,SSL_OP_ALL);
+
                        ftp->ssl_handle = SSL_new(ctx);
                        if (ftp->ssl_handle == NULL) {
                                php_error_docref(NULL TSRMLS_CC,
E_WARNING, "failed to create the SSL handle");
@@ -1513,6 +1515,8 @@
                        php_error_docref(NULL TSRMLS_CC, E_WARNING,
"data_accept: failed to create the SSL context");
                        return 0;
                }
+
+               SSL_CTX_set_options(ctx,SSL_OP_ALL);

                data->ssl_handle = SSL_new(ctx);
                if (data->ssl_handle == NULL) {

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

[2005-10-26 16:07:42] [EMAIL PROTECTED]

Can you please provide a patch in unified format.

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

[2005-05-17 13:03:54] frantisek at augusztin dot com

Nope, it doesn't work. Same error as in first submission. It doesn't
read any data after enabling SSL. As i said, enabling
special handling of non-conforming SSL servers using this line after
ctx variable initialization in both control and data connection helps
:

SSL_CTX_set_options(ctx,SSL_OP_ALL);

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

[2005-02-14 16:19:47] frantisek at augusztin dot com

Description:
------------
PHP returns following error when connecting using example code:
Warning: ftp_login() : Enabling SSL in /var/www/html/test.php on line
3

Using FTP client the following messages are displayed in the log window
of the client :

*** Connecting to 'XXX.XXX.XXX.XXX:21'...
220 Service Ready for new User
AUTH TLS
234 Enabling SSL

FTP clearly fails on this messsage. But i don't understand why, because
i found in source code, that 234 is not an error, but a valid result
code for this operation.
FTP System type is "215 NETWARE  Type : L8"

Reproduce code:
---------------
<?php
$connection = ftp_ssl_connect("server",21);
$login = ftp_login($connection, "name","password");
ftp_close($connection);
?>

Expected result:
----------------
No warning message and successfull connection to FTP server.

Actual result:
--------------
Warning: ftp_login() : Enabling SSL in /var/www/html/test.php on line 3


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


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

Reply via email to