Req #69580 [Fbk->Opn]: I need an FTP stream that doesn't use EPSV
| From: | cmb@php.net | Date: | Wed, 06 May 2015 20:32:48 +0000 |
| Subject: | Req #69580 [Fbk->Opn]: I need an FTP stream that doesn't use EPSV | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-192536@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69580&edit=1
ID: 69580
Updated by: cmb@php.net
Reported by: a_different_name at hotmail dot com
Summary: I need an FTP stream that doesn't use EPSV
-Status: Feedback
+Status: Open
Type: Feature/Change Request
Package: Streams related
Operating System: Linux
PHP Version: 5.5.24
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2015-05-06 04:32:51] 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 04:18:36] 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 03:56:41] 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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69580&edit=1