|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-12-31 00:02 UTC] cmb@php.net
-Package: Feature/Change Request
+Package: FTP related
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
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?