FTP problem to Name Based Virtual Server Web Site
Frank Leahy
frank at backtalk.com
Tue Jun 1 08:57:10 EDT 2004
On Jun 1, 2004, at 1:25 PM, use-revolution-request at lists.runrev.com
wrote:
> From: Sannyasin Sivakatirswami <katir at hindu.org>
> Subject: Re: FTP problem to Name Based Virtual Server Web Site
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <409BFE9C-B35F-11D8-B55A-000A959D0AC6 at hindu.org>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>
> 257 "/home/himalayan" is current directory.
> 200 Type set to I.
> 250 CWD command successful.
> 227 Entering Passive Mode (555,555,555,555,133,201).
> ## we are logged in, no path problem, but symlink not followed...
>
> no listing is returned and the result is empty...
>
> but the attempt to reach the *actual* directory, directly, as in URL2
> above
>
> results in
>
> error 550 /home/himalayan//var/www/html: No such file or directory
>
> but, again, only in Revolution...
>
I assume you're using "put URL" with an ftp URL? The problem is
probably due to Revolution doing an CWD (Change Working Directory) with
a full path rather than doing it with a relative path.
You'll have to use the low-level ftp routines such as
libURLftpCommand(), libUrlFtpUpload(), etc., and write some of your own
routines. It's pretty easy -- turn on logging in your ftp client and
copy what they do.
For example here's the login routine I use:
function ConnectToFTPServer
put libURLftpCommand("PWD", LFtpServer, LFtpUserName,
LFtpUserPassword) into theResult
if word 1 of theResult <> "257" then
throw theResult
else
put word 2 of theResult into loginCWD
-- Strip quotes in case they're sent by the ftp server.
-- Note: doesn't handle possible embedded quotes in the path name
(""), but we don't care...
replace quote with "" in loginCWD
end if
return loginCWD
end function
-- Frank
More information about the use-livecode
mailing list