Doc #64365 [Opn->Csd]: curl_setopt CURLOPT_FTPPORT doc is wrong
| From: | krakjoe@php.net | Date: | Sun, 17 Nov 2013 08:51:36 +0000 |
| Subject: | Doc #64365 [Opn->Csd]: curl_setopt CURLOPT_FTPPORT doc is wrong | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10611@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
Updated by: krakjoe@php.net
Reported by: sdfgsdf at thisisnotvalid dot com
Summary: curl_setopt CURLOPT_FTPPORT doc is wrong
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: krakjoe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2013-11-17 08:50:48] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=332147
Log: fix #64365
------------------------------------------------------------------------
[2013-04-20 19:43:14] sdfasdf at thisisnotvalid dot com
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
------------------------------------------------------------------------
[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