Just for the sake of arguing, here are some replies. :-)
1) I know. I'm not very familiar with Fortran, but I've seen enough of it
to know that there no longer is a good reason to use it for new projects.
My comment was mostly aimed at the comment about PHP not being a
real language. Of course they're both Turing complete, but then again so
is brainfuck (Now THAT's a useless language).
2a) The speed with which the ftp commands are parsed is largely irrelevant.
The problem would be being able to send files quickly enough. One way to solve
this would be to call an external program to send the files, but then things
start to get messy. And as I said I only have a 10Mbps connection, and on
a fast computer I'd have to do something horribly stupid to make the FTP
server slower than the connection.
2b) As long as the server has few incoming connections I could use inetd.
Using listen() is not an option without fork(). I wish PHP had better support
for fork(), playing around with file descriptors, and the exec family of functions.
4) To the best of my knowledge, no. That's why I'll have to rely on inetd.
Since I'm not currently root on my local machine, I'll probably make a small
program that does the bind, listen, fork and whatnot.
5) I made a threaded FTP server in C once. It was very AmigaOS-specific and
worked very well. Unfortunately I never completed it, and it was in part quite
badly designed in that there was no easy way to add passive mode.
The reason I want to do it in PHP now is that I have a web upload tool where
info about the files are stored in a MySQL database. I just want those files
to be accessible (and uploadable) via FTP as well.