Re: new ftp-module doesn't work at all (on solaris & Win32)

From: Date: Wed, 17 Nov 1999 19:33:54 +0000
Subject: Re: new ftp-module doesn't work at all (on solaris & Win32)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-12674@lists.php.net to get a copy of this message
On Wed, 17 Nov 1999, Mark Musone wrote: > > > > On Wed, 17 Nov 1999, Mark Musone wrote: > > > > > The only issue I have with this, is that this is far from > > > the only network protocol module that is built into PHP. > > > > but the only one build on to of stdio. again - fdopen on a socket *WILL* > > not work on win32 as sockets on win32 are *NOT* files! > > > > > > > > what are the X other modules (ldap, imap ..etc..) that implement > > > line-oriented protocols doing??? > > > > they use 3th party libs that run the protocol for them! these are usually > > well tested libraries. stdio is not a well tested library for running a > > telnet-protocol (which is what ftp uses) over the internet. out of all > > ftp/telnet implementation i know none uses stdio for their networking > > code. > > I've been working with these "third party libraries" for quite a while now.. same here... > > I just got finished with speaking with Andy. I slightly misunderstood the > problem at hand. I initially thought it was an issue of buffering on a socket, > not the issue of stdio being the question of a stream or file.. stig and sascha spend a good amount of time (somewhere between 3.0.9 and .11) on the php buffering code for sockets - you can see their work in fsock.c. buffering is *good* -> it reduces the amount of system-calls and makes things faster! so yes, we should buffer where we can (buffering = avoiding system-calls). > > (am i now understanding correctly??) think so. > > > > > > > > > > > This is far from anything out of the ordinary. I know for a fact the the c-client > > > library does not flush, and in fact i've hardly seen any network protocol > > > sources > > > that flush after evey line (thats actually the main reason why these protocols > > > are line oriented.) > > > > - do we agree that it won't work on windows? > > - do we agree that *not* handling any type of time-outs etc is not > > perfect? > > > > mark, i'd love to have a working ftp-module in php - i've tried this one, > > it didn't work for me, i looked into the sources and didn't like it that > > much. (see above). > > > It seems to me that the changes needed at hand are simply removing the sdio > and replacing it with an actual socket. flushing is not necessary.. > overall i dont believe it's a tremendously big change. no, not really - but if you look at the available ftp-clients out there (libftp, ncftp etc) you will agree that they have a lot of code in there for timeouts, broken connections etc. all that is would really be "nice-to-have". > > Andy's working on that now.. please ask him to have a look in the fopen-wrappers.c and fsock.c - writing network-code based on that will also run on win32. > > Also, as far as windows support is concerned, we're not windows people. > we'll do the best we can on making as much as we can "portable" but we have > neither the time nor experience to guarantee windows support. This is really > an opensource issue and IMHO the whole point of opensource software, everyone > pitches in and helps wit what they know best. yep, as you might know - i spend a good amount of time contributing code to php. > > If you are indicating that if we cannot get this working seamlessly with windows or > operating system X, then you dont want it in the PHP distribution, than so be it. > I have no problem removing the module from PHP. I think this shoul be a decision > by the whoile PHP community though. I know there are a number of modules that > only work on certain platforms.. you got me wrong - i'd really, really *love* to see that module working and usable in all cases!! i had a problem with: $fp = fopen("ftp://u:p@host/path/bla.txt","w"); bacause "host" runs a VMS ftp-server that does not understand STORE /path/bla.txt neither does it understand CWD /path STOR bla.txt you have to feed it CWD path // no slash at the beginning of the path STOR bla.txt so i wrote some php-code on top of andrews ftp-module - and it simply would not work. that's why i started this thread.. > > > > > unless i'm completly wrong we need to make some drastic changes to it if > > we want it to work with windows - also, if we want to handle timeouts some > > real changes would be needed. > > > I'm interested in what timeout issues you are talking about.. > again, comparing to other protocols, i dont see a problem. Please > explain some more. i'll have to dig a bit deeper into that (kill the ftp-sever while a transfer is running etc) and check what it actually does. i'll get back to you on this one regards, tc > > > Thanks, > > Mark. > > > > tc > > > > > > > > > > > > > Mark > > > > > > > > > > > On Fri, Nov 12, 1999 at 11:33:05PM +0100, Kristian Köhntopp wrote: > > > > > > > > > > Sascha Schumann wrote: > > > > > > Are sockets terminals or files? > > > > > > > > > > A file descriptor is a "terminal", if the isatty() > > > > > predicate returns true. It will then have line buffering > > > > > by default, block buffering otherwise. > > > > > > > > We should not rely on the default mode. Since it is not > > > > defined whether sockets are terminals/files, we should set > > > > the type of buffer always. > > > > > > > > -- > > > > > > > > Regards, > > > > > > > > Sascha Schumann > > > > Consultant > > > > > > > > -- > > > > PHP Development Mailing List > > > > <http://www.php.net/> > > > > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > > > > For additional commands, e-mail: php-dev-help@lists.php.net > > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > > > -- > > > PHP Development Mailing List > > > <http://www.php.net/> > > > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-dev-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > > Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" > > Digital Collections Phone +49 40 235350 Fax +49 40 23535180 > > Hammerbrookstr. 93 20097 Hamburg / Germany > > > > > > -- > > PHP Development Mailing List <http://www.php.net/> > > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > > For additional commands, e-mail: php-dev-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.dev (#12674) next »