Ticket #338 (closed defect: fixed)
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
Change History
Changed 3 years ago by mi.olszewski@…
-
attachment
FtpDeployTask.php
added

improved version of FtpDeployTask