ID:               22402
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jan+php at jancm dot org
-Status:           Assigned
+Status:           Closed
 Bug Type:         FTP related
 Operating System: Win2K
 PHP Version:      4.3.1
 Assigned To:      iliaa
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




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

Reply via email to