Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Location
    Egypt
    Posts
    88

    31016 <= Any clear Reason ?!

    I want to know a more clear reason for the error 31016 using FTP Plugins .. I use this code
    Code:
    ------------------------------[[ SCRIPT: Page: Page1, Object: Button2, Event: On Click Script ]]------------------------------
    -- Get the path of the image from the Input Object --
    path = Input.GetText("Input1");
    
    -- Separate Image Name from the rest of the Path --
    psep = String.SplitPath(path);
    -- Specify File name + Extension --
    file= ""..psep.Filename..""..psep.Extension.."";
    -- Connect to the FTP Server --
    FTP.Connect("*******.*******.*******", "*******", "*******", "", true);
    -- Navigate to the Folder of Upload --
    FTP.ChangeDir("/****");
    -- Check Whether a file with the same name and extension there --
    exist = FTP.GetFileInfo(file);
    -- If a file with the same name was found .. Error Message , Else, Upload --
    if exist == nil then 
    	FTP.Upload(path, file);
     	Dialog.Message("Image Uploaded Successfully", "Done, Image was uploaded .. Congrats.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);end
    if exist ~= nil then Dialog.Message("Sorry", "File already exists .. Please rename the fgile and try to upload it again.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);end
    
    FTP.Disconnect();
    I get this error after "most of" FTP actions their .. I guess it has something to do with the FireWall or whatever .. but i want, please, a clear point of view (detailed if possible)

    thnx and sorry for disturbance

    Yours,
    Galal

  2. #2
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    I'll take on the "what's this error" part of you situation:

    Error Codes
    0 (FTP.OK) - (no error)
    31000 (FTP.ERR_BAD_HOSTNAME) - Invalid hostname.
    31001 (FTP.ERR_NO_RESPONSE) - No response from server.
    31002 (FTP.ERR_INVALID_RESPONSE) - Negative response received from server.
    31003 (FTP.ERR_USER_NOT_ACCEPTED) - Username not accepted.
    31004 (FTP.ERR_PASSWORD_NOT_ACCEPTED) - Password not accepted.
    31005 (FTP.ERR_ACCOUNT_NOT_ACCEPTED) - Account string not accepted.
    31006 (FTP.ERR_CONNECT_FAILED) - Could not connect to FTP site.
    31007 (FTP.ERR_REQUEST_DENIED) - Request denied by server.
    31008 (FTP.ERR_INVALID_TRANSFER_TYPE) - Invalid transfer type. Valid values are 0, 1 and 2 (FTP.ASCII, FTP.BINARY or FTP.AUTO).
    31009 (FTP.ERR_INVALID_TIMEOUT_VALUE) - Invalid timeout value.
    31010 (FTP.ERR_SET_CONTROL_PORT_FAILED) - Could not set the control port.
    31011 (FTP.ERR_SET_DATA_PORT_FAILED) - Could not set the data port.
    31012 (FTP.ERR_INVALID_COMMAND) - FTP command cannot be an empty string.
    31013 (FTP.ERR_RENAME_FROM_SOURCE_FAILED) - Could not rename the file - problem with the "from" file (RNFR command failed).
    31014 (FTP.ERR_RENAME_TO_TARGET_FAILED) - Could not rename the file - problem with the "to" file (RNTO command failed).
    31015 (FTP.ERR_DATA_CONNECT_FAILED) - Data port could not be opened.
    31016 (FTP.ERR_PORT_REQUEST_FAILED) - Request to set data port rejected (PORT command failed).
    31017 (FTP.ERR_RETRIEVE_FAILED) - Unable to download file (RETR command failed).
    31018 (FTP.ERR_STORE_FAILED) - Unable to upload file (STOR command failed).
    31019 (FTP.ERR_CONNECTION_TERMINATED) - Connection was terminated before data transfer was complete.
    31020 (FTP.ERR_ABORTED) - Operation aborted by user.
    31021 (FTP.ERR_UNKNOWN_ERROR) - An unknown error occurred.
    31022 (FTP.ERR_INVALID_ADDRESS) - Invalid address.
    Intrigued

  3. #3
    Join Date
    Jul 2005
    Location
    Egypt
    Posts
    88
    ya i read it in the Help File but .. What is meant by it ??! It's not clear or known for me when it comes to "Request to set data port rejected (PORT command failed). "
    and is it something wrong with the code or with the connection or .. ?!

    and thnx for your kind reply

  4. #4
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728
    Some things to try:
    • Try connecting in passive mode. (If your server supports it, it's less likely to get blocked by your firewall.) Use FTP.SetPassiveMode(true) to turn it on.
    • If your server wants to use a specific data port, make sure you're using the correct one. Use FTP.SetDataPort() to set it if you need to.
    • If your server doesn't support passive mode, you'll need to open that data port in your firewall.
    • Try disabling your firewall to see if that makes any difference.
    • Search on google.com to learn more about FTP and the ports involved.
    --[[ Indigo Rose Software Developer ]]

  5. #5
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by el5ateer View Post
    ya i read it in the Help File but .. What is meant by it ??! It's not clear or known for me when it comes to "Request to set data port rejected (PORT command failed). "
    and is it something wrong with the code or with the connection or .. ?!

    and thnx for your kind reply
    Sorry, I got busy and forgot to get back to this thread.

    Looks like you have some avenues now though to persue.
    Intrigued

  6. #6
    Join Date
    Jul 2005
    Location
    Egypt
    Posts
    88
    Quote Originally Posted by Lorne View Post
    Some things to try:
    • Try connecting in passive mode. (If your server supports it, it's less likely to get blocked by your firewall.) Use FTP.SetPassiveMode(true) to turn it on.
    • If your server wants to use a specific data port, make sure you're using the correct one. Use FTP.SetDataPort() to set it if you need to.
    • If your server doesn't support passive mode, you'll need to open that data port in your firewall.
    • Try disabling your firewall to see if that makes any difference.
    • Search on google.com to learn more about FTP and the ports involved.
    Ya .. Thats solved it .. Thanks a lot

Similar Threads

  1. Clear input box
    By bobbie in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 04-27-2005, 09:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts