ID:               16348
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-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] [EMAIL PROTECTED]

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

Reply via email to