Passive FTP

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Passive FTP

Post by doobox » Sun Feb 16, 2014 12:05 pm

Hi there,

I am having some difficulty reliably uploading files to a server (dependant on the server).

I have wrote my code, and all works as expected on 1 server (a run-rev server).

But on another server of mine, i get sometimes a socket timeout message.
Normally though i just see "error" in the status callback.
I have double checked the full contents of the var tFtpDetails for the second server and they are correct and identical to the settings i use in forklift to connect to that server.
The only difference being that forklift uses passive mode.

Code: Select all

put "ftp://" & tUsername & ":" & tPassword & "@" & tFtpServer & tPort & tRemotePath &"/appcasts/appcast.php" into tFtpDetails
libURLSetStatusCallback "uploadProgress", the long ID of me
libURLftpUpload tAppcastPhp,tFtpDetails,"uploadComplete"
So what is passive mode really..?
And can i enable it in live code, so that any ftp actions are done in passive mode.?

I can not think of anything else that could be the issue.
Kind Regards
Gary

https://www.doobox.co.uk

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Passive FTP

Post by Mark » Sun Feb 16, 2014 4:18 pm

Hi Gary,

You can change the mode with libUrlSetFtpMode.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: Passive FTP

Post by doobox » Sun Feb 16, 2014 5:18 pm

Thanks Mark. It's a big library, and i totally missed that function when scanning through the docs. I'll give it a whirl :-)
Kind Regards
Gary

https://www.doobox.co.uk

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”