Bug #55188 [Fbk->NoF]: ftp_ssl_connect doesn't work
| From: | php-bugs at lists dot php dot net | Date: | Sun, 28 Feb 2021 04:22:13 +0000 |
| Subject: | Bug #55188 [Fbk->NoF]: ftp_ssl_connect doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232426@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55188&edit=1
ID: 55188
Updated by: php-bugs@lists.php.net
Reported by: gabriele dot brosulo at gmail dot com
Summary: ftp_ssl_connect doesn't work
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: FTP related
Operating System: Debian
PHP Version: 5.3.6
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2021-02-17 15:56:55] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?
[1] <php.net/supported-versions.php>
------------------------------------------------------------------------
[2011-07-12 10:53:58] gabriele dot brosulo at gmail dot com
Description:
------------
ftp_ssl_connect returns a correct FTP Buffer, ftp_login returns true, but ftp_nlist doesn't
list the files.
Using the same code but ftp_connect works.
Connecting to the server through a normal client (eg. Filezilla) works in SSL.
The problem is found on a debian squeeze, php5 version 5.3.6-12.
Test script:
---------------
$ftp = 'ftp.test.net';
$usr = 'username';
$pwd = 'password';
// Connessione
$conn_id = ftp_connect($ftp,21,1200);
echo "Risultato connessione: \n<br/>";
var_dump($conn_id);
// Login
$login_result = ftp_login($conn_id, $usr, $pwd);
echo "Risultato login: ";
var_dump($login_result);
// Passive mode
ftp_pasv($conn_id, true);
if ($conn_id !== false && $login_result !== false) {
// Lista dei file
$files = ftp_nlist($conn_id,'.');
echo "\n<br/>Contenuto dir: ";
var_dump($files);
}
// Chiudo la connessione
ftp_close($conn_id);
echo "<br/><br/>";
// Connessione SSL
$conn_id = ftp_ssl_connect($ftp,21,1200);
echo "\n<br/>Risultato connessione SSL: ";
var_dump($conn_id);
// Login
$login_result = ftp_login($conn_id, $usr, $pwd);
echo "\n<br/>Risultato login: ";
var_dump($login_result);
// Passive mode
ftp_pasv($conn_id, true);
if ($conn_id !== false && $login_result !== false) {
// Lista dei file
$files = ftp_nlist($conn_id,'.');
echo "\n<br/>Contenuto dir: ";
var_dump($files);
}
// Chiudo la connessione
ftp_close($conn_id);
Expected result:
----------------
The same result in both ftp_connect and ftp_ssl_connect
Actual result:
--------------
Risultato connessione:
resource(14) of type (FTP Buffer) Risultato login: bool(true)
Contenuto dir: array(3) { [0]=> string(12) "test2" [1]=> string(8)
"ipaq.zip" [2]=> string(7) "prova" }
Risultato connessione SSL: resource(16) of type (FTP Buffer)
Risultato login: bool(true)
Contenuto dir: bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55188&edit=1