|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-02-14 16:19 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 12:00:02 2025 UTC |
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) {