#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    2
    Rep Power
    0

    ftp_connect() ??


    Hello friends,

    I try to connect to my ftp server using a simple php script in my LAN and also in my hosting server and I always get the same error,

    'Fatal error: Call to undefined function: ftp_connect() in /usr/www/htdocs/mydominio/tiempo/ftpget.php on line 2

    I use PHP 4.0.2 and always works fine. What's the problem ? Why undefinel function ? It's not a function in PHP 4?

    I don't understang this error message !!

    Here you are the mini-code:

    <?php

    $conn = ftp_connect("oneftp.server.com");

    ftp_login($conn, "anonymous", "email@server.com");


    ftp_get($conn, "data.txt", "data.txt", FTP_ASCII);


    ftp_quit($conn);

    ?>

    Well, I have changed the user, the pass and the server

    Thx
    I wait...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    Sydney
    Posts
    41
    Rep Power
    14
    In order to make ftp to work, you must use ./configure --enable-ftp when you build PHP binary.

IMN logo majestic logo threadwatch logo seochat tools logo