FTP API Rewriteat 2009-05-17 in Announcements by friebe (0 comments) The old FTP API used PHP's ftp extension. This had limitations that expressed themselves when using the streaming capabilities:$file= $conn->rootDir()->getDir('htdocs')->getFile('index.html'); This code worked as expected but made the connection unusable thereafter. This was due to the fact that streaming requires using ftp_raw() commands and we needed to read two lines (150 opening XXX mode connection and 226 transfer complete), which is not supported. This messes up the internal state maintained in the implementation's stack. Because FTP is a drop-dead simple protocol, current head now contains a complete rewrite of the FTP api to use pure sockets. At the same time, there is no longer a dependency on the ftp extension. |
|