Doc #64365 [Com]: curl_setopt CURLOPT_FTPPORT doc is wrong

From: Date: Sat, 20 Apr 2013 19:43:15 +0000
Subject: Doc #64365 [Com]: curl_setopt CURLOPT_FTPPORT doc is wrong
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9751@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64365&edit=1 ID: 64365 Comment by: sdfasdf at thisisnotvalid dot com Reported by: sdfgsdf at thisisnotvalid dot com Summary: curl_setopt CURLOPT_FTPPORT doc is wrong Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Additionally, the explanation of what the options actually *do* needs work. Options are listed as if they were all equally typical / normal / necessary, when in fact some of them are quite esoteric, rarely if ever necessary. Just looking at the name of CURLOPT_FTPPORT, one might expect that it was an alternative way to specify the FTP port. In the modern-since-1998 EPSV mode, there is only one FTP port that is explicitly given a number, so by that standard there is only one FTP port. Unfortunately, as an old and hoary protocol, there is technically no such thing as 'the' FTP port, because FTP supports all sorts of oddball modes. In old-school PASV mode, and especially in old-bordering-on-ancient-school active mode where PORT is used, that modern assumption is no longer the case. The PHP helpdocs ought to reflect that, in general, unless you are doing something weird, FTPPORT is not gonna be useful. (Right now they are just a cut-n-paste of the cURL helpdocs... but with brain-o mistakes like POST-vs-PORT added in! Better to document the common options in an easy-to-understand way, and refer to the official helpdocs on the official webpage ... or else, make sure the php helpdocs are an improvement rather than a detriment.) Here is an example where FTPPORT was required: http://stackoverflow.com/questions/13914262/ftp-fails-to-transmit-data-in-passive-mode-libcurl Here is a case where EPSV and PASV and a misconfigured FTP server demand some of the esoteric options be put into realworld use: http://www.unixlore.net/articles/using-curl-for-ftp-over-ssl-file.html Previous Comments: ------------------------------------------------------------------------ [2013-03-06 02:43:39] sdfgsdf at thisisnotvalid dot com Description: ------------ --- From manual page: http://www.php.net/function.curl-setopt#refsect1-function.curl- setopt-parameters --- CURLOPT_FTPPORT text is wrong, there is no such thing as FTP "POST". Expected result: ---------------- The value which will be used to get the IP address to use for the FTP "PORT" instruction. The "PORT" instruction tells the remote server to connect to our specified IP address. The string may be a plain IP address, a hostname, a network interface name (under Unix), or just a plain '-' to use the systems default IP address. Actual result: -------------- The value which will be used to get the IP address to use for the FTP "POST" instruction. The "POST" instruction tells the remote server to connect to our specified IP address. The string may be a plain IP address, a hostname, a network interface name (under Unix), or just a plain '-' to use the systems default IP address. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64365&edit=1

« previous php.doc.bugs (#9751) next »