PDA

View Full Version : Internal FTP in 1.5RC2


msbc
17th of February 2004 (Tue), 03:33
Pekka,

Can you explain what the new 'Internal FTP' is and it's advantages/disadvantages over the PHP version.

Thanks,
Mark

Pekka
17th of February 2004 (Tue), 04:41
OK.

This explanation contains some very technical talk, but I do not know any other way to exlain it :)

Internal ftp means that you do not need PHP's ftp module for EE any more. I have written my own ftp functions to replace PHP's ftp functions. These functions work on socket level.

This gives several advantages:

Bugs in PHP ftp module do not matter any more. One serious PHP ftp bug was "a hanging resource" where ftp system did not release its resource and you'd need to reboot the server to get it back. Other bug was that in some versions PHP ftp system failed to upload very small files. One bug is that file listings freeze the whole system.

If there are problems with specific ftp server type, I can troubleshoot the problems and fix them. With PHP's own ftp there is no way to get fixes other than updating the whole PHP.

Error and command progress reporting is much more accurate.

I can do realtime (or 1 display update /sec) transfer progress bar and byte info. It is not possible to do this with PHP's ftp. This is now done in message window, in next version there will be a new model for uploading which will report all file progress, files left etc in separate windows.

There are several types of file listings available with internal ftp and they work. PHP file listings (RAW and NLIST) are very prone to hanging totally and freezing PHP with them. With internal ftp these functions work without problems. They will make it possible for me to add new features like "delete all unused photo files" or "get total size of photo files on this EE".

MTDM and SIZE commands can be used as is, but if they do not exist in server they can be emulated with internal ftp.

Only downside of internal ftp system I know is that it can not be used with ftp servers that refuse to build passive mode connections. I know only some very old ftp servers (like wu-2.4.2-academ) which are not compatible ([b]addition: it works too with fix in http://photography-on-the.net/forum/viewtopic.php?p=153045#153045 ) . All modern servers will and should negotiate passive mode.