Bug #16348 Updated: (PHP4.2.0RC1) ftp_connect() argument problem
| From: | mfischer@php.net | Date: | Sat, 30 Mar 2002 01:59:14 +0000 |
| Subject: | Bug #16348 Updated: (PHP4.2.0RC1) ftp_connect() argument problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-3637@lists.php.net to get a copy of this message | ||
ID: 16348
Updated by: mfischer@php.net
Reported By: jome@emoj.net
-Status: Open
+Status: Closed
Bug Type: FTP related
Operating System: Linux
PHP Version: 4.1.2
New Comment:
Fixed in CVS and 4_2_0, thx.
Previous Comments:
------------------------------------------------------------------------
[2002-03-29 12:07:08] jome@emoj.net
This has been discussed on the php-qa-list and it looks like you have
to use ftp_connect("localhost",0,21); instead of
ftp_connect("localhost",21);
I've not understood what the 0 in the above example represents.
While excluding the port argument (and the zero) no problem occurs.
<whatLizsaid>
OK,
Opens a FTP stream */
PHP_FUNCTION(ftp_connect)
{
ftpbuf_t *ftp;
char *host;
int host_len, port = 0;
long timeout_sec = FTP_DEFAULT_TIMEOUT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll",
&host, &host_len, &port, &timeout_sec) == FAILUR
E) {
return;
}
If you do ftp_connect("localhost",0,21); it connects, I don't know
what
host_len is, but you need to specify it before port.. Bug?
</whatLizsaid>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16348&edit=1