php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69580 I need an FTP stream that doesn't use EPSV
Submitted: 2015-05-06 03:56 UTC Modified: 2015-05-06 20:32 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: a_different_name at hotmail dot com Assigned:
Status: Open Package: Streams related
PHP Version: 5.5.24 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-05-06 03:56 UTC] a_different_name at hotmail dot com
Description:
------------
I'm trying to use streams to write a data file to an FTP server with a somewhat broken setup -- it understands `EPSV`, but is behind a NAT that doesn't.  So even though the `EPSV` succeeds, the data connection (and thus the `fopen`) fails because the router didn't set up a NAT entry for the data port.

This would not be a problem if i could tell PHP to skip `EPSV` and just use `PASV` instead (which works fine).  As it stands now, i instead have to either avoid streams, or write my own version of the FTP wrapper.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-06 04:18 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2015-05-06 04:18 UTC] requinix@php.net
Have you tried using the FTP functions? It looks like ftp_pasv() only attempts EPSV with an IPv6 connection.
 [2015-05-06 04:32 UTC] a_different_name at hotmail dot com
That's what i meant by "avoiding streams". I'm having to use the ftp_ functions instead.

The goal was to be able to hand the code a URL (which, ideally, could be any destination for which there's a stream wrapper registered), and have it put the file there. The need to avoid EPSV is getting in the way of that.
 [2015-05-06 20:32 UTC] cmb@php.net
-Status: Feedback +Status: Open
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 20:01:28 2019 UTC