Modify

Ticket #338 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

FtpDeployTask is not setting passive mode, which makes uploading files impossible in some environments

Reported by: [mi.olszewski] [et] [gmail[.com] Owned by: hans
Priority: major Milestone:
Component: phing-tasks-ext Version: 2.3.2
Keywords: ftp deploy Cc:

Description

Phing version: 2.3.3

In my environment FtpDeployTask was unable to upload files onto FTP server until I've added call to Net_FTP::setPassive(). As it is stated in ftp_pasv PHP documention: "In passive mode, data connections are initiated by the client, rather than by the server. It may be needed if the client is behind firewall." and currently most of computers are behind some firewall...

Thus I've modified FtpDeployTask to accept additional parameter (passive). If set to true task calls Net_FTP::setPassive() after successful login (as stated in ftp_pasv documentation).

Attached, version of FtpDeployTask with passive attribute plus minor modifications:

  • call to Net_FTP::disconnect() before throwing BuildException
  • $this->dir is always created, just in case that it doesn't exist

Please re-integrate at least 'passive' attribute into phing FtpDeployTask. Thanks

Attachments

FtpDeployTask.php Download (6.1 KB) - added by mi.olszewski@… 3 years ago.
improved version of FtpDeployTask

Change History

Changed 3 years ago by mi.olszewski@…

improved version of FtpDeployTask

comment:2 Changed 3 years ago by mrook

  • Status changed from new to closed
  • Resolution set to fixed

This bug has been fixed in the SVN tree, revision r437.

Thank you for the report, and for helping us make Phing better!

comment:3 Changed 3 years ago by hans

  • Reporter changed from mi.olszewski@… to [mi.olszewski] [et] [gmail[.com]
View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.