|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-02-24 22:21 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
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).