#22402 [Opn->Asn]: fopen with ftp url
| From: | iliaa@php.net | Date: | Mon, 24 Feb 2003 22:15:12 +0000 |
| Subject: | #22402 [Opn->Asn]: fopen with ftp url | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-34131@lists.php.net to get a copy of this message | ||
ID: 22402
Updated by: iliaa@php.net
Reported By: jan+php at jancm dot org
-Status: Open
+Status: Assigned
Bug Type: FTP related
Operating System: Win2K
PHP Version: 4.3.1
-Assigned To:
+Assigned To: iliaa
Previous Comments:
------------------------------------------------------------------------
[2003-02-24 14:43:00] jan+php at jancm dot org
fopen will, apparently, always open a pasv mode data connection (to a
ftp type url). Most ftp servers return a code of:
150 "File status okay; about to open data connection",
but in some cases they return a
125 "125 Data connection already open; transfer starting."
(It really depends on the server. WarFTP will return a 125);
fopen works fine when a 150 is returned. It breaks when a 125 is
returned instead.
I *think* the only change needed is in line 418 of
ext\standard\ftp_fopen_wrapper.c (based on 4.3.1 source), but I can't
compile it to check. :(
Currently it reads:
if (result != 150) {
and I think it should be:
if (result != 150 && result != 125) {
References:
RFC 959
also see ext\ftp\ftp.c
lines: 683, 765, 1473, 1581, and 1694
(the ftp functions all work fine in both passive and active modes).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22402&edit=1