ID: 21642 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Sockets related PHP Version: 4.3.0 New Comment:
fsockopen is intended to open *only* a raw socket and not implement some protocol level stuff -> that is what the URL wrappers are for in fopen(). Please try one of the alternative methods for working with secure ftp. If you find a problem with those, then open a new bug report. Previous Comments: ------------------------------------------------------------------------ [2003-01-15 05:51:31] [EMAIL PROTECTED] Please add rfc2228 handle to fsockopen(); :-) ------------------------------------------------------------------------ [2003-01-15 05:41:13] [EMAIL PROTECTED] Just info when using fopen(); it retruns Warning: fopen(ftps://...@ip:port) [function.fopen]: failed to create stream: Operation not permitted in ..... ------------------------------------------------------------------------ [2003-01-15 05:12:21] [EMAIL PROTECTED] TLS becomes more a standard instead of FTP. I cant recognize the reason why fsockopen() doesnt handle tls/ssl similare to fopen(). Why not starting (like fopen() it does) in clear mode, then switch to tls/ssl if this all is FLASE return fail ? Atm i have to run a TLSwrapper in background to connect FTP+TLS cause fsock yes but ssl... The use of Curl or fopen instead ? Sounds a bit crazy for me tho :) A Create a socket function should handle all streams. Im looking forward to fsockopen supports ftp+tls :) Greetings Toppi ------------------------------------------------------------------------ [2003-01-14 16:41:05] [EMAIL PROTECTED] this is expected behaviour; fsockopen("tls://") opens the socket with TLS turned on. By default, TLS-enabled ftp servers start "in the clear" - with crypto turned off. If you want to use TLS over ftp, consider using fopen("ftps://") instead (which will attempt TLS negotiation according to the relevant rfcs), or if that is not sufficient, try using the curl functions. ------------------------------------------------------------------------ [2003-01-14 16:28:29] [EMAIL PROTECTED] Trying to tls://ftp_ip:port ... Warning: fsockopen() [function.fsockopen]: php_stream_sock_ssl_activate_with_method: SSL handshake/connection failed in ftpclass.php on line 204 Warning: fsockopen() [function.fsockopen]: failed to activate SSL mode 2 in ftpclass.php on line 204 The TLS SERVER replies tru fread() at least : UK (glftpd 1.28_Linux+TLS) ready. 500 '': Command not understood. I would expect when using a tls-prefix its working similare to ftp_ssl_connect (what is working fine but not needed cause no filepointer back). No chance in php to connect ftp+tls tru fsock which is needed if you need a filepointer back to use fread/write etc. Greetings Toppi ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21642&edit=1