Thread: ftp - ftp_put

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

    Join Date
    Apr 2002
    Posts
    3
    Rep Power
    0

    Angry ftp - ftp_put


    I am having trouble with ftp_put()

    I connect to the server fine and the file to be uploaded is local to the php script but I still get problems


    $upload = ftp_put($conn_id, "new_file.txt", "my_file.txt", FTP_BINARY);

    results in

    Warning: ftp_put: Illegal PORT rejected (address wrong). in /usr/local/apache/htdocs/paul/ftp_file.php on line 72


    any ideas ?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    3
    Rep Power
    0

    Smile ANSWER


    Chuffing firewalls !

    Changing the port No. PASV didnt work either.

    all sorted
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    24
    You're not the real slim shady that all the other slim shady's are just immitating by spitting in my onion rings and hanging out in the parking lot... are you?
  6. #4
  7. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    Why are you uploading .txt files in binary?
    And you know I mean that.
  8. #5
  9. No Profile Picture
    hmm...
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Nashville
    Posts
    50
    Rep Power
    14
    Have you set your connection????



    $fp = ftp_connect("ip_address");

    $transfer = ftp_put($fp,"new_file.txt","my_file.txt",FTP_ASCII);
  10. #6
  11. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    ..he has, and he's solved his problem already (I suppose, from his 'all sorted')... and yeah FTP_ASCII is default you dont have to specify it....and you forgot to log in to server in your code
    And you know I mean that.
  12. #7
  13. No Profile Picture
    hmm...
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Nashville
    Posts
    50
    Rep Power
    14
    You are so right...
    Atleast it was closer than without any connection at all....
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    3
    Rep Power
    0

    guys


    the all sorted did mean it worked

    connection etc done previously

IMN logo majestic logo threadwatch logo seochat tools logo