php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40884 Cannot specify port range in pasv mode
Submitted: 2007-03-21 17:12 UTC Modified: 2016-12-31 00:02 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: simon at connexon dot com Assigned:
Status: Open Package: FTP related
PHP Version: 5.2.1 OS: Windows Server 2003
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: simon at connexon dot com
New email:
PHP Version: OS:

 

 [2007-03-21 17:12 UTC] simon at connexon dot com
Description:
------------
Ok, I searched everywhere for this but could not find anything... And I think it should be there. When using pasv_mode for a ftp connection, we should allowed to specify the port range that the passive mode will be using. In our case, the place where we need to upload some files accept only pasv connections with ASCII data, and a range of ports between 49000 and 50000.

So ftp_connect does connect to port 21, however there is no way to specify that the pasv_mode will be using a range of ports. So the changes of it using a port in the range is quite slim!

Any ideas?

Reproduce code:
---------------
$conn_id = ftp_connect(_FTP_SERVER_, 21, 15) or die("Could not connect to FTP");

ftp_pasv($conn_id, true);

$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_ASCII) or die("Could not upload the desired file.");

Expected result:
----------------
The file being uploaded

Actual result:
--------------
Well since it's not using a valid port, it fails.
But I guess it's normal since we can't specify a port range!

Can this be integrated in PHP?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-31 00:02 UTC] cmb@php.net
-Package: Feature/Change Request +Package: FTP related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 08:01:27 2024 UTC