[REBOL] FTP upload/download
Hi, Can anyone point me a script for upload (optionaly download) of a whole directory to a ftp server? This server host my entire web site. It´s not necessary a user interaction, once it will be scheduled to run at night. Thanks in advance. -- Júlio César Santana TRE/SE CODAN (079) 216-8681 -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP upload/download
Julio Cesar Santana wrote.. apparently on 19-May-2004/15:34:24-3:00 Hi, Can anyone point me a script for upload (optionaly download) of a whole http://www.compkarori.co.nz/reb/ftp-dirupload.r -- Graham Chiu http://www.compkarori.com/cerebrus http://www.compkarori.com/rebolml -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP problem
Just an update for those interested. Regarding the memory leak in FTP, over the weekend I was able to copy ~6500 files over FTP using Smooth Copy before the memory leak caused the program to fail. That's a definite improvement over the ~1500 files it was failing at last week. Bohdan Bo Lechnowsky Lechnowsky Technical Consulting -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP memory leak?
Hello, all. I was wondering if anyone had seen a memory leak related to FTP. I have written a backup application using Rebol. I can back up 50,000 local files without any problems, but if I try to back up ~250 files from an FTP location to a local drive, Rebol's memory usage goes through the roof and then I get a crash due to not enough memory. IIRC, someone wrote an improved FTP. Does it address this? Where can I get it? Thanks! Bohdan Bo Lechnowsky Lechnowsky Technical Consulting -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP server
Hello, I'm going to write an FTP upload handler in REBOL. Do you guys have any experience in that field? Any help would be appreciated. Pawel -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP make-dir/deep problem
Hi, is the make-dir/deep code borking when used with an FTP URL? make-dir/deep ftp://bla:[EMAIL PROTECTED]/www/screenshots/page01/ ** User Error: Server error: tcp 550 www/screenshots/: No such file or directory. ** Near: make-dir/deep ftp://bla:[EMAIL PROTECTED]/www/screenshots/page01/ It should create /screenshots/page01/ in directory /www/... Any ideas? -- Robert M. Münch Management IT Freelancer Mobile: +49 (177) 245 2802 http://www.robertmuench.de -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP
The last beta release has reached a good point. All known bug fixed (among them low connections number) I should like to extend the base of testers before the final release. If someone want to test it, he can send an email to my address. People with ftp connections to MS servers, exotic FTP servers, servers stripped down, proxy of every types, low numbers (1 2) of connections are welcome! --- Ciao Romano -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] ftp and the closing of ports.
Hello, I've been reading some of the posts regarding rebol's ftp. I am having an issue with the closing of ftp ports. My host recently went to a 2 ftp connection limit (from the same IP) and this has caused my 5 year old ftp scripts to fail. What happens is this - I have a function that opens a port, writes a file then closes the port. It only works once however because on the next call, the ftp server complains I have reached the limit. At this point even testing is a bear because I have to wait until the server closes the port to try again. It looks like the port really isn't closed. I've attempted Brett Handley's system/schemes/ftp/handler/cache-size: 0 but I get an invalid path value error. Any ideas? Thanks, James -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] ftp probs
I've made a small change to the Rebol view editor to add an ftp option to the menu at http://www.compkarori.com/vanilla/display/vt-editor but the problem is that after 900 seconds, I can't open another ftp file. I get a timeout error. It looks like Rebol keeps the ftp connection open, and it gets timedout. So, any ideas on how to close the connection down to prevent this error? --Graham -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] ftp scheme (cont.)
Hi again, It would be great if Ashley and Carl could run this new test against their servers. This one is in source code form rather than a patch. ---What I've done Romano wrote (some days back): If LIST is not implemented, the server should return an error, not an empty list of files. I think this is entirely reasonable, so in this latest FTP scheme I've changed the logic to use NLST only if parsing of LIST results fails. That is, if nothing is returned successfully I consider that an empty directory, if something is returned but our parse rules fail then I use NLST. Because it is simpler, NLST is unlikely to fail (if it is implemented on the server). If by chance both do actually fail, then I raise an error. I've also factored out the common logic as I see it into a separate function to see how LIST and NLST are so similiar. I've also merged the various patches added a little more network logging and changed [error? catch value ] sequences to [error? try [catch value]] pending Romano's comments on this error handling strategy. do http://www.codeconscious.com/ftp-testing/ftp-proposed.r trace/net true read ftp:// Regards, Brett. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP scheme was Re: Reading empty directories via FTP error
Brett wrote Ashley's 226 error was solved (see patch in REBOL library). Ashley also had the same error as Carl's (NLST) - which hopefully now is solved. Ashley's third problem was a general one about having had an FTP error, FTP could become unusable for the rest of the session - which I think you have identified in your error handling comments. Hey, you know my issues better than me now! ;) Assuming a combination of patches from you, Carl, Romano, and others correct these (and other) various problems, how much of the FTP scheme handler code is being patchd? 25%, 50%, 75%? Not withstanding the vagaries of the FTP standard / protocol, have we reached the point where a number of FTP related functions should be replaced by a merge of the various patches out there? Or have I underestimated the complexity of the task? I'll volunteer to test anything against the two sites I have access to (the second of which has a subset of the problems identified above). Regards, Ashley -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP woes
Hello! I am trying to write a large number of large files to an FTP server using Rebol. The first dozen or two will go fine, but after that I get the following error when trying to open the FTP port: make object! [ code: 501 type: 'access id: 'not-open arg1: Port^@ arg2: arg3: none near: [open/binary/new/write/direct dstfile] where: 'get-cur-dir ] dstfile looks something like this: ftp://user:[EMAIL PROTECTED]/test/sitebuilder.r.old If the file does not already exist, open/new should create a new file. The odd thing here is that it works for the first dozen or two. I also tried running the same script on my home network to another computer running an FTP server, but got the same results, although even quicker. I've tried setting system/schemes/ftp/passive to true, false and none with no luck. Has anyone else seen this problem? If so, do you know of a solution? Thanks! -Bo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FTP access via a port spec
Hello everyone, I am trying to access the ftp server that my ISP set up so I can create my home page(s). Since the username contains an @ character I have no choice but to use a port spec as specified in the Core user guide (http://www.rebol.com/docs/core23/rebolcore-13.html#sect11.11.) the following code works well : tiftp: [scheme: 'FTP host: ftp.host.com port-id: 21 user: username pass: userpass target: %index.php3] print read tiftp however looking at my firewall status window I noticed that it keeps the port 21 open until it finally times out. The documentation (same url above) also states that things may be done such as this : ftp-port: open [ scheme: 'ftp host: ftp.site.com user: Username; and yes I set those right ;) pass: Password ] But says absolutely nothing about how to specify the file to manipulate. Trying to read from such port results in an error : read ftp-port ** Script Error: read expected source argument of type: file url object block ** Where: halt-view ** Near: read ftp-port I tried all kind of stupid things such as read ftp-port/index.php3 but did not get much further. And I found nowhere in the docs how such ftp port could be actually used. This is very surprising since I can't see the interest of being able to open a ftp port if it can't be used... So I'll have a few questions regarding this experience : - would anyone know why does Rebol maintains an opened port despite the fact that the 'read is over ? - does it make sense to use a port spec to access a ftp server ? (assuming the answer is yes) - how can I specify the file to operate upon ? - what does it mean exactly to have an open port open on a ftp server : is it simply an open TCP connection or is it something more elaborate ? I am currently having a very strange feeling about Rebol, it is very powerful to use but the documentation seems insufficient to me on some points like those, which makes it quite painful to do even very simple things. It can be very frustrating at times to see that the documentation opens a new path to explore but does not go any further : there are handlers, schemes and protocols but not much is said of how to build one, what features this or that one provides, and so on... It all seems very powerful but also very osbcure and I would like to know if this feeling is shared by other people on the list ? Thank you in advance ;) Best regards, Laurent -- Laurent Giroud[EMAIL PROTECTED] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp read fails
Hello All: I'm getting time out in ftp access from my machine to any number of domains for which I have ftp access. (Python's tools are working (as a check on this)) with 'trace on the entire process hangs. Here's last few lines: ** Result: {150 Opening ASCII mode data connection for /bin/ls.} (string) Result: {150 Opening ASCII mode data connection for /bin/ls.} (string) Result: {150 Opening ASCII mode data connection for /bin/ls.} (string) Trace: server-said (word) Result: {150 Opening ASCII mode data connection for /bin/ls.} (string) Trace: parse-dir-list (word) Trace: all (word) Trace: [not passive not proxy listen-port port/sub-port: first listen-port] (block) Trace: not (word) Trace: passive (word) Result: true (logic) Trace: not (word) Trace: proxy (word) Result: true (logic) Trace: listen-port (word) Trace: port/sub-port: (set-path) Trace: first (word) Trace: listen-port (word) ** this is with the following code: read ftp://log:[EMAIL PROTECTED]/index.html I get different results with the following attempt: write ftp://log:[EMAIL PROTECTED] read %ml.r connecting to: www.johnsons-web.com ** User Error: Server error: tcp 500 'STOR ': command not understood. ** Near: write ftp://log:[EMAIL PROTECTED] read %ml.r Any ideas on what I can do to resolve this? regards and TIA -- Tim Johnson [EMAIL PROTECTED] http://www.alaska-internet-solutions.com http://www.johnsons-web.com -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp read fails
More on this: Not working across my internal network either: write ftp://log:[EMAIL PROTECTED] read %ml.r connecting to: 192.168.1.1 ** User Error: Server error: tcp 500 'STOR ': command not understood. ** Near: write ftp://log:[EMAIL PROTECTED] read %ml.r 'trace on show the same. version Core 2.5.0.4.2 -tj- * Tim Johnson [EMAIL PROTECTED] [020608 08:52]: Hello All: I'm getting time out in ftp access from my machine to any number of domains for which I have ftp access. (Python's tools are working (as a check on this)) with 'trace on the entire process hangs. Here's last few lines: ** Result: {150 Opening ASCII mode data connection for /bin/ls.} (string) Result: {150 Opening ASCII mode data connection for /bin/ls.} (string) Result: {150 Opening ASCII mode data connection for /bin/ls.} (string) Trace: server-said (word) Result: {150 Opening ASCII mode data connection for /bin/ls.} (string) Trace: parse-dir-list (word) Trace: all (word) Trace: [not passive not proxy listen-port port/sub-port: first listen-port] (block) Trace: not (word) Trace: passive (word) Result: true (logic) Trace: not (word) Trace: proxy (word) Result: true (logic) Trace: listen-port (word) Trace: port/sub-port: (set-path) Trace: first (word) Trace: listen-port (word) ** this is with the following code: read ftp://log:[EMAIL PROTECTED]/index.html I get different results with the following attempt: write ftp://log:[EMAIL PROTECTED] read %ml.r connecting to: www.johnsons-web.com ** User Error: Server error: tcp 500 'STOR ': command not understood. ** Near: write ftp://log:[EMAIL PROTECTED] read %ml.r Any ideas on what I can do to resolve this? regards and TIA -- Tim Johnson [EMAIL PROTECTED] http://www.alaska-internet-solutions.com http://www.johnsons-web.com -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes. -- Tim Johnson [EMAIL PROTECTED] http://www.alaska-internet-solutions.com http://www.johnsons-web.com -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] FTP gadget
Hello list,talking to a guy on IOS messenger and was telling him about FTP gadget but can not find the url.Does any body have it/Thanks! -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] FTP large files (Answering my own question)
About FTP of large files. Here is a quote from the rebol documetation... (sorry I did not read...) Transferring Large Files Transferring large files requires special considerations. You may want to transfer the file in chunks to reduce the memory required by your computer and to provide user feedback while the transfer is happening. Here is an example that downloads a very large binary file in chunks. inp: open/binary/direct ftp://ftp.site.com/big-file.bmp out: open/binary/new/direct %big-file.bmp buf-size: 20 buffer: make binary! buf-size + 2 while [not zero? size: read-io inp buffer buf-size][ write-io out buffer size total: total + size print [transferred: total] ] Be sure to use the /direct refinement, otherwise the entire file will be buffered internally by REBOL. The read-io and write-io functions allow reuse of the buffer memory that has already allocated. Other functions such as copy would allocate additional memory. If the transfer fails, you can restart FTP from where it left off. To do so, examine the output file or the size variable to determine where to restart the transfer. Open the file again with a custom refinement that specifies restart and the location from which to start the read. Here is an example of the open function to use when the total variable indicates the length already read: inp: open/binary/direct/custom ftp://ftp.site.com/big-file.bmp reduce ['restart total] You should note that restart only works for binary transfers. It cannot be used with text transfers because the line terminator conversion that takes place will cause incorrect offsets. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] FTP Large Files (the saga continues...)
Still think FTP of large files should be improved in rebol/core 2.6 since I cannot get any code to work reliably in version 2.5. Does not mean 2.5 has a bug, just means that it is difficult for a person to make it work reliably. If it ain't simple and reliable, it still needs to be improved (in my opinion.) Or does someone have a function that implements a simple and reliable way to FTP large files using rebol/core 2.5 -DV -Original Message- From: Vos, Doug [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 4:44 PM To: '[EMAIL PROTECTED]' Subject: [REBOL] Re: FTP large files (Answering my own question) Actually - this is really crazy... Can you get this code to work? rfile: ftp://bigserver/bigfile.zip lfile: %/d/data/bigfiles/bigfile.zip inp: open/binary/direct rfile out: open/binary/new/direct lfile total: 0 buf-size: 200'000'000 ; change this to any size you want buffer: make binary! buf-size + 2 while [not zero? size: read-io inp buffer buf-size][ write-io out buffer size total: total + size print [transferred: total] ] close inp close out -Original Message- From: Vos, Doug [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 3:29 PM To: '[EMAIL PROTECTED]' Subject: [REBOL] FTP large files (Answering my own question) About FTP of large files. Here is a quote from the rebol documetation... (sorry I did not read...) Transferring Large Files Transferring large files requires special considerations. You may want to transfer the file in chunks to reduce the memory required by your computer and to provide user feedback while the transfer is happening. Here is an example that downloads a very large binary file in chunks. inp: open/binary/direct ftp://ftp.site.com/big-file.bmp out: open/binary/new/direct %big-file.bmp buf-size: 20 buffer: make binary! buf-size + 2 while [not zero? size: read-io inp buffer buf-size][ write-io out buffer size total: total + size print [transferred: total] ] Be sure to use the /direct refinement, otherwise the entire file will be buffered internally by REBOL. The read-io and write-io functions allow reuse of the buffer memory that has already allocated. Other functions such as copy would allocate additional memory. If the transfer fails, you can restart FTP from where it left off. To do so, examine the output file or the size variable to determine where to restart the transfer. Open the file again with a custom refinement that specifies restart and the location from which to start the read. Here is an example of the open function to use when the total variable indicates the length already read: inp: open/binary/direct/custom ftp://ftp.site.com/big-file.bmp reduce ['restart total] You should note that restart only works for binary transfers. It cannot be used with text transfers because the line terminator conversion that takes place will cause incorrect offsets. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas (fixed!)
Hi, Then I peeked at your code and changed the minimum version number from 1.2.0.255.255 to 1.2.1.255.255 so the patch would be applied to Rebol/view. After that the 226 error was gone! Thats great :) Looks like the system version check in patches.r is too conservative. I'll change it. Regards, Brett. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Rebol, FTP and quotas
Hi I'm getting a quota problem with two different ftp-servers, when I try to manipulate (delete, write) the files on the ftp-server: ftp-dir: some-ftp-server files: read ftp-dir foreach file files [delete ftp-dir/:file] gives: User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes Why is this an error?? The servers work perfectly outside Rebol and I can manipulate files normally. Reading directories works fine, but trying to read the contents of a file gives: User Error: Server error: tcp 200 PORT command successful. This seems illogical to me. :-) Regards, Henrik Mikael Kristensen -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas
From: Henrik Mikael Kristensen I'm getting a quota problem with two different ftp-servers, when I try to manipulate (delete, write) the files on the ftp-server: ftp-dir: some-ftp-server files: read ftp-dir foreach file files [delete ftp-dir/:file] gives: User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes Why is this an error?? I don't know either, but, depending on your needs, you may be able to achieve similar functionality with the following: ftp-dir: ftp://user-name:[EMAIL PROTECTED]/a-folder/ files: read ftp-dir foreach file files [delete join ftp-dir [file]] The servers work perfectly outside Rebol and I can manipulate files normally. Reading directories works fine, but trying to read the contents of a file gives: User Error: Server error: tcp 200 PORT command successful. Are you using a form soemthing like the following to read the contents of a file? ftp-dir: ftp://user-name:[EMAIL PROTECTED]/a-folder/ print read ftp-dir [a-file-name] rest snipped Hope this helps. --Scott Jones -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas
09-03-2002 16:21:14, G. Scott Jones [EMAIL PROTECTED] wrote: From: Henrik Mikael Kristensen I'm getting a quota problem with two different ftp-servers, when I try to manipulate (delete, write) the files on the ftp-server: ftp-dir: some-ftp-server files: read ftp-dir foreach file files [delete ftp-dir/:file] gives: User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes Why is this an error?? I don't know either, but, depending on your needs, you may be able to achieve similar functionality with the following: ftp-dir: ftp://user-name:[EMAIL PROTECTED]/a-folder/ files: read ftp-dir foreach file files [delete join ftp-dir [file]] Same result... but I just figured that it's not just manipulation which goes wrong this way (I should have checked the directory contents before posting. Sorry...). When it's empty or I input a wrong filepath, I get User Error: Server error: tcp 200 PORT command successful.. So the 200 error is forgivable. But every time I access a correct file, I get 226 Quota errors. And this only happens with two servers: A local ProFTPD and an a remote ProFTPD ftp-server. Others work just fine (including other ProFTPD servers). I have no firewall set up. Could this be a ProFTPD config problem? I tried 'trace/net on' and the following output was generated when I tried to access a file in a directory: print read join ftp-dir [dir-to-read-from] URL Parse: user pass url none none dir-to-read-from Net-log: [Opening tcp for FTP] Net-log: [ none [220 230]] Net-log: {220 ProFTPD 1.2.1 Server (server)]} Net-log: [ [USER port/user] 331] Net-log: 331 Password required for user. Net-log: [ [PASS port/pass] 230] Net-log: 230 Welcome to some-server Net-log: [ SYST *] Net-log: 215 UNIX Type: L8 Net-log: [ [PORT port/locals/active-check] 200] Net-log: 200 PORT command successful. Net-log: [ [CWD either empty? port/path [./] [join ./ port/path]] 250] Net-log: 250 CWD command successful. Net-log: [ [TYPE A] [200]] Net-log: 200 Type set to A. Net-log: [ [join LIST port/target] [150 125]] Net-log: {150 Opening ASCII mode data connection for file list.} Net-log: [ none 226] Net-log: 226-Transfer complete. Net-log: [ [PORT port/locals/active-check] 200] ** User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes ** Near: print read join ftp-dir [dir-to-read-from] It seems the ftp-transfer itself is successful, but Rebol chokes after that. The servers work perfectly outside Rebol and I can manipulate files normally. Reading directories works fine, but trying to read the contents of a file gives: User Error: Server error: tcp 200 PORT command successful. Are you using a form soemthing like the following to read the contents of a file? ftp-dir: ftp://user-name:[EMAIL PROTECTED]/a-folder/ print read ftp-dir [a-file-name] Irrelevant now, but it is the url-syntax you mentioned which I use. Hope this helps. Well, it didn't... dammit :-) Regards, Henrik Mikael Kristensen -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas
Hi, As far as i understand, this kind of errors occurs because the FTP handler doesn't recognize the response code sent by the server. Try this patch before starting your ftp session : system/schemes/ftp/handler/rmfile-check/2: [250 226] append system/schemes/ftp/handler/read-check/2 200 When you encounter such error, you should turn trace/net on and if possible, send the log to the ml. HTH, -DocKimbel. Henrik Mikael Kristensen wrote: Hi I'm getting a quota problem with two different ftp-servers, when I try to manipulate (delete, write) the files on the ftp-server: [...] gives: User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes Why is this an error?? [...] User Error: Server error: tcp 200 PORT command successful. [...] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas
Hi Henrik, This patch will correct your error: system/schemes/ftp/handler/active-check/2: [200 226] -DocKimbel. Henrik Mikael Kristensen wrote: [...] Net-log: [ [PORT port/locals/active-check] 200] ** User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes ** Near: print read join ftp-dir [dir-to-read-from] [...] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp client
Some years ago, I volunteered to host a mirror of a webzine. This involves the ftp'ing of 1-200 files every few months. Trouble is, often the ftp process would die with an error, and it was a hassle determining where to start from again. ( I've tried several ftp clients. ) I've now been told that many files are missing, so I now have to upload the whole site again - 1500 - 3000 files :( So, I thought I would try using Rebol for this. My first pass is at sites/Compkarori/FTP dir or, on Developer IOS users/Graham Chiu/Scripts/ftp-dirupload But, a few problems 1. I read the local directory with files: load %./ If I don't lower the security level at the start of the script, then when I execute the above, it brings up a console screen :( 2. When I do an info? ftp://remote_file I get a size of 0 bytes on one of my servers (Solaris/Apache), but on another it works fine. To overcome this problem, I have to do info? http:// remote_file 3. I want a clean way of halting the ftp loop. I have a button that changes a flag ( halt? ), and the loop checks the state of the flag, but I can't activate the button. Otherwise, it seems to be working fine. If it dies, I can continue where I left off currently halfway thru issue 4 of 15 :) -- Graham Chiu -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas
09-03-2002 22:16:35, Nenad Rakocevic [EMAIL PROTECTED] wrote: Hi, As far as i understand, this kind of errors occurs because the FTP handler doesn't recognize the response code sent by the server. OK Try this patch before starting your ftp session : system/schemes/ftp/handler/rmfile-check/2: [250 226] append system/schemes/ftp/handler/read-check/2 200 When you encounter such error, you should turn trace/net on and if possible, send the log to the ml. HTH, -DocKimbel. ok, thanks, I tried it and this is the result from a fresh new rebol session (usernames, passwords and urls removed): system/schemes/ftp/handler/rmfile-check/2: [250 226] == [ [DELE port/locals/file] [250 226] ] append system/schemes/ftp/handler/read-check/2 200 == [150 125 200] trace/net on ftp-dir: ftp://user:pass@url/path/ == ftp://user:pass@url/path/ Now I tried reading the directory which was empty: print read ftp-dir URL Parse: user pass url none path/ none Net-log: [Opening tcp for FTP] Net-log: [ none [220 230]] Net-log: {220 ProFTPD 1.2.1 Server (path)} Net-log: [ [USER port/user] 331] Net-log: 331 Password required for user. Net-log: [ [PASS port/pass] 230] Net-log: 230 Welcome to server Net-log: [ SYST *] Net-log: 215 UNIX Type: L8 Net-log: [ [PORT port/locals/active-check] 200] Net-log: 200 PORT command successful. Net-log: [ [CWD either empty? port/path [./] [join ./ port/path]] 250] Net-log: 250 CWD command successful. Net-log: [ [TYPE A] [200]] Net-log: 200 Type set to A. Net-log: [ [LIST] [150 125]] Net-log: {150 Opening ASCII mode data connection for file list.} Net-log: [ none 226] Net-log: 226-Transfer complete. Net-log: [ [PORT port/locals/active-check] 200] Net-log: [ PASV 227] ** User Error: Server error: tcp 200 PORT command successful. ** Near: print read ftp-dir Same as before. Then I put a file there manually with an FTP-program: print read ftp-dir URL Parse: user pass url none path/ none Net-log: [Opening tcp for FTP] Net-log: [ none [220 230]] Net-log: {220 ProFTPD 1.2.1 Server (server)} Net-log: [ [USER port/user] 331] Net-log: 331 Password required for user. Net-log: [ [PASS port/pass] 230] Net-log: 230 Welcome to server Net-log: [ SYST *] Net-log: 215 UNIX Type: L8 Net-log: [ [PORT port/locals/active-check] 200] Net-log: 200 PORT command successful. Net-log: [ [CWD either empty? port/path [./] [join ./ port/path]] 250] Net-log: 250 CWD command successful. Net-log: [ [TYPE A] [200]] Net-log: 200 Type set to A. Net-log: [ [LIST] [150 125]] Net-log: {150 Opening ASCII mode data connection for file list.} Net-log: [ none 226] Net-log: 226-Transfer complete. file.txt Which seemed to work just fine Then I tried to read the contents of the file: print read join ftp-dir [file.txt] URL Parse: user pass url none path/ none Net-log: [Opening tcp for FTP] Net-log: [ none [220 230]] Net-log: {220 ProFTPD 1.2.1 Server (server)} Net-log: [ [USER port/user] 331] Net-log: 331 Password required for user. Net-log: [ [PASS port/pass] 230] Net-log: 230 Welcome to server Net-log: [ SYST *] Net-log: 215 UNIX Type: L8 Net-log: [ [PORT port/locals/active-check] 200] Net-log: 200 PORT command successful. Net-log: [ [CWD either empty? port/path [./] [join ./ port/path]] 250] Net-log: 250 CWD command successful. Net-log: [ [TYPE A] [200]] Net-log: 200 Type set to A. Net-log: [ [join LIST port/target] [150 125]] Net-log: {150 Opening ASCII mode data connection for file list.} Net-log: [ none 226] Net-log: 226-Transfer complete. Net-log: [ [PORT port/locals/active-check] 200] ** User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes ** Near: print read join ftp-dir [file.txt] Again same error as before. Just to make sure: print join ftp-dir [file.txt] ftp://user:pass@url/path/file.txt The syntax for the URL is correct. system/version == 1.2.1.3.1 and it's Rebol/View I'm running. Regards, Henrik Mikael Kristensen -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas
Hi, Doc 10-03-2002 00:39:22, Nenad Rakocevic [EMAIL PROTECTED] wrote: This patch will correct your error: system/schemes/ftp/handler/active-check/2: [200 226] Thanks! :-) It helped along with the two other patches, but another error shows up (session continued from last posting): system/schemes/ftp/handler/active-check/2: [200 226] == [ [PORT port/locals/active-check] [200 226] ] print read join ftp-dir [file.txt] URL Parse: user pass url none path/ file.txt Net-log: [Opening tcp for FTP] Net-log: [ none [220 230]] Net-log: {220 ProFTPD 1.2.1 Server (server)} Net-log: [ [USER port/user] 331] Net-log: 331 Password required for user. Net-log: [ [PASS port/pass] 230] Net-log: 230 Welcome to server Net-log: [ SYST *] Net-log: 215 UNIX Type: L8 Net-log: [ [PORT port/locals/active-check] [200 226]] Net-log: 200 PORT command successful. Net-log: [ [CWD either empty? port/path [./] [join ./ port/path]] 250] Net-log: 250 CWD command successful. Net-log: [ [TYPE A] [200]] Net-log: 200 Type set to A. Net-log: [ [join LIST port/target] [150 125]] Net-log: {150 Opening ASCII mode data connection for file list.} Net-log: [ none 226] Net-log: 226-Transfer complete. Net-log: [ [PORT port/locals/active-check] [200 226]] Net-log: 226 Quotas on: using 0.00 of 10.00 MegaBytes Net-log: [ [TYPE I] [200]] Net-log: 200 PORT command successful. Net-log: [ [RETR port/target] [150 125 200]] Net-log: 200 Type set to I. Net-log: [low level read of 1985 bytes] Net-log: [low level read of 1485 bytes] Net-log: [low level read of 985 bytes] Net-log: [low level read of 485 bytes] Net-log: [ none 226] ** Access Error: Port none not open ** Where: halt-view ** Near: print read join ftp-dir [file.txt] I've seen this one before in another posting, where the directory was empty, but it's not empty here and I'm sure I'm reading the file correctly. Actually I performed this three times (I've shown the second, the third is identical to the second), but the first one didn't show the last two low level reads: Net-log: [low level read of 985 bytes] Net-log: [low level read of 485 bytes] as if it stops reading at a random position. file.txt is 1985 bytes long, so I presume it has been read correctly, but other things are still considered garbage to Rebol. Net-log: [ [PORT port/locals/active-check] 200] ** User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes ** Near: print read join ftp-dir [dir-to-read-from] Regards, Henrik Mikael Kristensen -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas
Hi User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes Try this line and repeat your tests: do http://www.codeconscious.com/rebsite/rebol-library/patches.r If fixes a bug in the FTP scheme that handles response 226. The bug does not exist in some later versions of Rebol. Brett. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas (fixed!)
Hi, Brett 10-03-2002 04:02:51, Brett Handley [EMAIL PROTECTED] wrote: Hi User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes Try this line and repeat your tests: do http://www.codeconscious.com/rebsite/rebol-library/patches.r ok, here goes (fresh rebol session): do %/c/rebol/patches.r == {Replace DEBASE to avoid crash - Applied. ctx-text/back-field to cycle properly - Applied. FTP Scheme for 226 multiline server r... ftp-dir: ftp://user:pass@url/path/ trace/net on print read join ftp-dir [file.txt] URL Parse: user pass url none path/ file.txt Net-log: [Opening tcp for FTP] Net-log: [ none [220 230]] Net-log: {220 ProFTPD 1.2.1 Server (server)} Net-log: [ [USER port/user] 331] Net-log: 331 Password required for user. Net-log: [ [PASS port/pass] 230] Net-log: 230 Welcome to server Net-log: [ SYST *] Net-log: 215 UNIX Type: L8 Net-log: [ [PORT port/locals/active-check] 200] Net-log: 200 PORT command successful. Net-log: [ [CWD either empty? port/path [./] [join ./ port/path]] 250] Net-log: 250 CWD command successful. Net-log: [ [TYPE A] [200]] Net-log: 200 Type set to A. Net-log: [ [join LIST port/target] [150 125]] Net-log: {150 Opening ASCII mode data connection for file list.} Net-log: [ none 226] Net-log: 226-Transfer complete. Net-log: [ [PORT port/locals/active-check] 200] ** User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes ** Near: print read join ftp-dir [file.txt] Nope. Same error. But not to worry, this has a happy ending. :-) I checked if it really applied it (fresh rebol session): print do http://www.codeconscious.com/rebsite/rebol-library/patches.r Replace DEBASE to avoid crash - Applied. ctx-text/back-field to cycle properly - Applied. FTP Scheme for 226 multiline server response bug - Not Applied. and it didn't. If fixes a bug in the FTP scheme that handles response 226. The bug does not exist in some later versions of Rebol. Which is why it doesn't apply the 226 patch. I checked my Rebol/View version system/version == 1.2.1.3.1 Then I peeked at your code and changed the minimum version number from 1.2.0.255.255 to 1.2.1.255.255 so the patch would be applied to Rebol/view. After that the 226 error was gone! Thanks for your help everyone. :-) Regards, Henrik Mikael Kristensen -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol, FTP and quotas
Something just struck me, and I'm kind of late replying, so smack me on the side of the head if it's already been fixed. For instance: files: read ftp-dir foreach file files [delete join ftp-dir [file]] Wouldn't that attempt to delete . and .. not to mention subdirectories (which can result in a no-no - haven't tried it with REBOL)? --Charles From: Henrik Mikael Kristensen I'm getting a quota problem with two different ftp-servers, when I try to manipulate (delete, write) the files on the ftp-server: ftp-dir: some-ftp-server files: read ftp-dir foreach file files [delete ftp-dir/:file] gives: User Error: Server error: tcp 226 Quotas on: using 0.00 of 10.00 MegaBytes Why is this an error?? I don't know either, but, depending on your needs, you may be able to achieve similar functionality with the following: ftp-dir: ftp://user-name:[EMAIL PROTECTED]/a-folder/ files: read ftp-dir foreach file files [delete join ftp-dir [file]] The servers work perfectly outside Rebol and I can manipulate files normally. Reading directories works fine, but trying to read the contents of a file gives: User Error: Server error: tcp 200 PORT command successful. Are you using a form soemthing like the following to read the contents of a file? ftp-dir: ftp://user-name:[EMAIL PROTECTED]/a-folder/ print read ftp-dir [a-file-name] rest snipped Hope this helps. --Scott Jones -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp map to local drive ....
Hi, I was asked by our Lotus Notes admin if there is any kind of tool which will allow to map ftp connection as a local drive. They are so dumb, that they will try to find so obscure solution, because Lotus Notes can't simply read ftp protocol directly, nor it can write data in byte mode (only two bytes at once I was told, but I can't believe it), so .pdf attachement which will come thru RFC from our SAP system, can't be stored directly to harddrive. So the solution no 1 is to map AIX fpt drive to local drive or b) to find any kind of ODBC driver, which can accept binary data and simply write it to disc under some name :-) I told them to use small Rebol server for TCP communication or just plain and simply do the thingy directly in Rebol, but it was refused. So at the end, if they don't find any tool, they will create small Delphi app (because it can be trusted :-) and run the executable, so basically - they will achieve cgi mode functionality. Eh, is it worth a comment? :-) -pekr- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp problem
hello all, I'm havin a problem reading a file from a pureFTP server, this is what I get: print read ftp://gonzo:[EMAIL PROTECTED]/movie-in/bru_21g.gif connecting to: 10.0.0.22 ** User Error: Server error: tcp 226 1 matches total ** Near: print read ftp://gonzo:[EMAIL PROTECTED]/movie-in/bru_21g.gif any idea would be very welcome, thanks Will Arp -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp problem
Hi rebols, I am receiving an access error trying to ftp to several directories on our isp's server. Using WS_FTP95 I can transfer the files, but not with rebol. However, I am able to use rebol to send files to other directories on the same server just fine. Any ideas what the problem might be? Louis -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Ftp upload to a Macintosh
Hi all, I can't send or read a file on a macintosh FTP server. I tried several versions of Rumpus and Webstar FTP. I also tried passive mode with no success. Does anyone knows what's the problem? Rebol or ftp on the Mac? Thanks for lot of replies ;-) Here is the log made with trace/net on: write/append ftp://***:***@**.***.***.***/test.txt test URL Parse: * * **.***.**.*** none none test.txt Net-log: [Opening tcp for FTP] connecting to: **.***.**.*** Net-log: [ none [220 230]] Net-log: 220-Bienvenue sur le serveur Ftp de - Net-log: 220 Service ready for new user Net-log: [ [USER port/user] 331] Net-log: 331 Password required Net-log: [ [PASS port/pass] 230] Net-log: 230 User logged in Net-log: [ SYST *] Net-log: 215 MACOS Peter's Server Net-log: [ [PORT port/locals/active-check] 200] Net-log: 200 PORT command successful Net-log: [ [CWD either empty? port/path [./] [join ./ port/path]] 250] ** User Error: Server error: tcp 550 File not found ** Near: write/append ftp://***:***@**.***.**.***/test.txt Test -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp reading an empty folder
When I try to read an empty ftp directory I get this message: ** Access Error: Port none not open ** Where: parse-dir-list How can I handle this error. I think in this case read should return an empty list, not throw an error. Daniel -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp to parent directory on a HP-UX
Hi all, I cannot read parent directories using read FTP towards a HP-UX server files: read ftp://user:psw@server/../ ** Script Error: Invalid argument: 12/maj/2000 ** Where: to-date ** Near: to date! :value If I do this towards a server using either Solaris or Windows it works perfectly... Any suggestions? Brgds /Micael -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] ftp dir
1) How to make a change-dir on a ftp dir? 2) How to make a ftp directory listing with date-size without re-making connections to the server? Core user guide p. 12-41 makes only a bug example. Rebol gives error already on Forall. I know that all the info (date-size and so on) are already cached in the port. How to read them in a legal mode? --- UG 12-41: To print a directory listing: files: open ftp://ftp.site.com/pub/ forall files [ file: first files info: info? file print [file info/date info/size info/type] ] --- Ciao (my english is bad) Romano -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] FTP: how to avoid multiple connection ?
Hello, when uploading several files, rebol connect once for each file ? That's very slow: is it possible to avoid that ? thanks. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] FTP errors - 3 types
Type 1] I received the following error when I was deleting a file User Error: Server error: tcp 226 Quotas off But the delete worked. I actually wanted this in a loop but because of the error (I think) it aborted the loop. Type 2] Another error I got was this: ** User Error: Server error: tcp 530 Sorry, maximum number clients (3) from your host already connected. And the delete did not work in this case. I then closed Rebol/View and restarted. I could then complete the command with first error appearing again. Type 3] The other thing I wanted to do was use the info? function on an ftp target. In a fresh instance of Rebol/View it worked the first time, but subsequent times I got the following error ** Script Error: ** User Error: Server error: tcp 200 PORT command successful. ** Near: throw make error! info Sorta kills a loop. On a different FTP server though this one worked fine... Any help appreciated. Brett. --- http://www.codeconscious.com -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] ftp question
When you use REBOL's built-in FTP protocol, does it send a "bye" command when it is finished downloading? Or does it just let the FTP connection time out? Ryan C. Christiansen Web Developer Intellisol International 4733 Amber Valley Parkway Fargo, ND 58104 701-235-3390 ext. 6671 FAX: 701-235-9940 http://www.intellisol.com Global Leader in People Performance Software _ Confidentiality Notice This message may contain privileged and confidential information. If you think, for any reason, that this message may have been addressed to you in error, you must not disseminate, copy or take any action in reliance on it, and we would ask you to notify us immediately by return email to [EMAIL PROTECTED] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] ftp problems
Hello all, I've sent the following to feedback. Maybe someone has experienced the same problem, or knows more about it (especially concerning the second ftp problem): I found a bug when trying to make a directory on a remote ftp site with high ascii characters, even when the url is mime encoded. write/binary ftp://user:[EMAIL PROTECTED]/rttrt20%dsds/ Rebol doesn't accept this, but it does when the accented characters are in the filename. Also, on cetain ftp hosts, I get the following message systematically : "Server error: tcp 530 Login for user 'fantam' failed (Logged in too many times.)" while if I try manually, I do get in. I suspect this has something to do about how rebol is announcing itself to the host. Could you tell me if this is customizable. I also noticed that on the remote host, a file called rebol.dhs.org is created and left behind. Maybe it's related with the above problem. Finally, after repeated tcp 530 errors (the ftp transfers are dynamic in my script), rebol crashes. I'm using winNT 5 (w2k) machine and the latest rebol experimental 2.4.40.3.1 -- mailto:[EMAIL PROTECTED] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] FTP Write Error (Append/Restart not permitted)
Hi Write/append causes a failure when I attempt to append to a remote file. Full reads and writes are performed successfully: i.e. : ;where blk is a block of test: write/lines full-path blk ;executes successfully read/lines full-path ; works too! write/append full-path "this is a test" ; generates the error message below: ** User Error: Server error: tcp 451 test.txt: Append/Restart not permitted, try again.. ** Where: write/append full-path "this is a test" any ideas, also would be helpful to know if code 451 is a standard tcp error or if it is rebol-originated. Thanks! Tim -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] FTP and Absolute Directories
Some time ago I posted a question asking how I could ftp to a server and go to a directory that was not below my home directory. For example, I would like to ftp to another server here at work, and get a file located in /var/local/datamover/test1/. The problem is that Rebol seems to only let you specify relative directory paths below where you ftp in. So, if I use the ftp command and specify my user id and password, it will only let me reference a directory below my home directory. Perl, using the Net::FTP object lets me ftp using an absolute path. I'm hoping someone out there has an idea how I can do this in Rebol. I would really like to write this application in Rebol instead of Perl. Thanks in advance for the help! -- Jamey Cribbs
[REBOL] FTP and Absolute Directories Re:
Did you try "../../path/path/path/goodfile.txt" ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 3:01 PM To: [EMAIL PROTECTED] Subject: [REBOL] FTP and Absolute Directories Some time ago I posted a question asking how I could ftp to a server and go to a directory that was not below my home directory. For example, I would like to ftp to another server here at work, and get a file located in /var/local/datamover/test1/. The problem is that Rebol seems to only let you specify relative directory paths below where you ftp in. So, if I use the ftp command and specify my user id and password, it will only let me reference a directory below my home directory. Perl, using the Net::FTP object lets me ftp using an absolute path. I'm hoping someone out there has an idea how I can do this in Rebol. I would really like to write this application in Rebol instead of Perl. Thanks in advance for the help! -- Jamey Cribbs
[REBOL] FTP and Absolute Directories Re:(2)
Hey, that worked! I did: read ftp://user:[EMAIL PROTECTED]/../../var/local/datamover/test1/testfile1 and it worked. Thanks very much for the help! On Tue, 17 Oct 2000, you wrote: Did you try "../../path/path/path/goodfile.txt" ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 3:01 PM To: [EMAIL PROTECTED] Subject: [REBOL] FTP and Absolute Directories Some time ago I posted a question asking how I could ftp to a server and go to a directory that was not below my home directory. For example, I would like to ftp to another server here at work, and get a file located in /var/local/datamover/test1/. The problem is that Rebol seems to only let you specify relative directory paths below where you ftp in. So, if I use the ftp command and specify my user id and password, it will only let me reference a directory below my home directory. Perl, using the Net::FTP object lets me ftp using an absolute path. I'm hoping someone out there has an idea how I can do this in Rebol. I would really like to write this application in Rebol instead of Perl. Thanks in advance for the help! -- Jamey Cribbs -- Jamey Cribbs Sr. Technical Consultant
[REBOL] FTP Timeout
Hi ALL I know this question wasmade in here a hundred times but I needthe answer again, please. Howcanchange the value for FTP time out? Thanks Carlos
[REBOL] FTP Timeout Re:
Carlos wrote: I know this question was made in here a hundred times but I need the answer again, please. How can change the value for FTP time out? Check out page 360 in new Rebol/Core manual PDF, 12-12. There's a very good reference there. Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/ --
[REBOL] FTP return codes
Hello all, Suppose I try to transfer a file with rebol ftp's scheme to a device that has not enough space left, and I don't know about this. If I catch the ftp operation with error? and 'try, I will know that the operation failed, but how can I access the specific error codes (that some ftp clients show to users, for example a message "not enough space left on device") Thanks in advance, fantam -- [EMAIL PROTECTED]
[REBOL] FTP problems -- mystery.
I had an HP-UX server running a REBOL script in a cron job every night to pull a data file from a wNT box. That script does foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt (wrapped in a try block), then post-processes the data before writing it to a local file. This had been running non-stop since mid-April. On 26 Jun 2000 I upgraded that HP-UX box from 2.2 to 2.3 (don't try to read that aloud! ;-). Everything continued to work properly. On 10 Aug 2000 the above statement began consistently failing. I can run the standard ftp utility from the command line and retrieve the file (with almost instantaneous response), but the REBOL script fails whether run manually or via cron. When I run REBOL interactively and try the same command, with tracing enabled, I get the following: system/schemes/ftp/passive: on == true (The above inspired by Carl's note below, but the same happens without that intervention.) foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt connecting to: 1.2.3.4 ** User Error: Server error: tcp HTTP/1.0 408 Request Time-out. ** Where: foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt trace/net on foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt URL Parse: userid password 1.2.3.4 none path/ file.txt Net-log: ["Opening tcp for" FTP] connecting to: 1.2.3.4 Net-log: [ none ["220" "230"]] ** User Error: Server error: tcp HTTP/1.0 408 Request Time-out. ** Where: foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt system/schemes/ftp/passive == true Any suggestions from the REBOLnetworkingwizards about what I should try next? -jn- [EMAIL PROTECTED] wrote: It might be your firewall, if you have one. The 2.3 release needs to have a line: system/schemes/ftp/passive: on in order to run in passive mode. Not very user friendly, sorry. 2.2 did it automatically, but this mode cannot be reliably detected on some firewalls. I'm think that we need to detect it better under 2.3... and do at least as well as 2.2 in guessing at it. -Carl
[REBOL] FTP problems -- mystery. Re:
Hi, I'm not a REBOLnetworkingwizard, but from the error message "tcp HTTP/1.0 408 Request Time-out." it seems that a HTTP, not FTP server listens at default FTP port 21, so the WinNT server configuration may be responsible for it. Causes of such mysterious errors are easily discovered with a packet sniffer and analyzer, where you can see the whole TCP communication. hope this helps, -- Michal Kracik [EMAIL PROTECTED] wrote: I had an HP-UX server running a REBOL script in a cron job every night to pull a data file from a wNT box. That script does foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt (wrapped in a try block), then post-processes the data before writing it to a local file. This had been running non-stop since mid-April. On 26 Jun 2000 I upgraded that HP-UX box from 2.2 to 2.3 (don't try to read that aloud! ;-). Everything continued to work properly. On 10 Aug 2000 the above statement began consistently failing. I can run the standard ftp utility from the command line and retrieve the file (with almost instantaneous response), but the REBOL script fails whether run manually or via cron. When I run REBOL interactively and try the same command, with tracing enabled, I get the following: system/schemes/ftp/passive: on == true (The above inspired by Carl's note below, but the same happens without that intervention.) foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt connecting to: 1.2.3.4 ** User Error: Server error: tcp HTTP/1.0 408 Request Time-out. ** Where: foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt trace/net on foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt URL Parse: userid password 1.2.3.4 none path/ file.txt Net-log: ["Opening tcp for" FTP] connecting to: 1.2.3.4 Net-log: [ none ["220" "230"]] ** User Error: Server error: tcp HTTP/1.0 408 Request Time-out. ** Where: foo: read ftp://userid:[EMAIL PROTECTED]/path/file.txt system/schemes/ftp/passive == true Any suggestions from the REBOLnetworkingwizards about what I should try next? -jn- [EMAIL PROTECTED] wrote: It might be your firewall, if you have one. The 2.3 release needs to have a line: system/schemes/ftp/passive: on in order to run in passive mode. Not very user friendly, sorry. 2.2 did it automatically, but this mode cannot be reliably detected on some firewalls. I'm think that we need to detect it better under 2.3... and do at least as well as 2.2 in guessing at it. -Carl
[REBOL] FTP problems -- mystery. Re:(2)
Thanks, Michal... But I believe the services on the host(s) are correct. It seems that I get a similar message whenever I try to connect from REBOL (either on the HP-UX box or my desktop box running Linux) to ANY ftp server. However, a transcript from a console ftp session (to the same host I'm trying to hit from REBOL) makes it appear that a "normal" ftp service is running on the host's port 21. $ ftp 1.2.3.4 Connected to 1.2.3.4. 220 HOSTNAME Microsoft FTP Service (Version 4.0). Name (1.2.3.4:user): userid 331 Password required for userid. Password: 230-Hello, welcome to HOSTNAME. 230 User userid logged in. Remote system type is Windows_NT. ftp ls 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. 09-25-00 07:23AM DIR downloads 09-24-00 06:00PM DIR xxx 08-24-00 09:01AM DIR yyy 05-12-00 03:02PM DIR zzz 06-30-00 05:38PM DIR www ftp quit 221 Goodbye! $ I get a similar response when connecting to the HP-UX server from my Linux box, and I just checked /etc/services and /etc/inetd.conf to verify that ftp really is running on port 21. $ ftp my-hpux-box Connected to my-hpux-box. 220 my-hpux-box FTP server (Version 1.7.212.2 Tue Apr 21 12:14:46 GMT 1998) ready. Name (my-hpux-box:zzuserzz): xxuserxx 331 Password required for xxuserxx. Password: 230 User xxuserxx logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp ls 200 PORT command successful. 150 Opening ASCII mode data connection for /usr/bin/ls. . . long ls output suppressed here . 226 Transfer complete. ftp get user.r junkfilekillme local: junkfilekillme remote: user.r 200 PORT command successful. 150 Opening BINARY mode data connection for user.r (152 bytes). 226 Transfer complete. 152 bytes received in 0.00718 secs (21 Kbytes/sec) ftp quit 221 Goodbye. $ But then, from my desktop Linux box... system/version == 2.3.0.4.2 (just FYI) foo: read http://www.rebol.com/ URL Parse: none none www.rebol.com none none none Net-log: ["Opening tcp for" HTTP] connecting to: www.rebol.com Net-log: {GET http://www.rebol.com/ HTTP/1.0 Accept: */* Connection: close User-Agent: REBOL 2.3.0.4.2 Host: www.rebol.com } Net-log: "HTTP/1.0 200 OK" Net-log: ["low level read of " 11210 "bytes"] == {!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" HTML HEAD META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-... (OK. We've verified REBOL talking to the network.) foo: read ftp://xxuseridxx:xxpasswordxx@my-hpux-host/ URL Parse: xxuseridxx xxpasswordxx my-hpux-host none none none Net-log: ["Opening tcp for" FTP] connecting to: my-hpux-host Net-log: [ none ["220" "230"]] ** User Error: Server error: tcp HTTP/1.0 408 Request Time-out. ** Where: foo: read ftp://xxuseridxx:xxpasswordxx@my-hpux-host/ ??? - [EMAIL PROTECTED] wrote: Hi, I'm not a REBOLnetworkingwizard, but from the error message "tcp HTTP/1.0 408 Request Time-out." it seems that a HTTP, not FTP server listens at default FTP port 21, so the WinNT server configuration may be responsible for it. Causes of such mysterious errors are easily discovered with a packet sniffer and analyzer, where you can see the whole TCP communication. hope this helps, -- Michal Kracik
[REBOL] FTP problems -- mystery. Re:(3)
On Mon, Sep 25, 2000 at 04:20:10PM -0500, [EMAIL PROTECTED] wrote: Thanks, Michal... But I believe the services on the host(s) are correct. It seems that I get a similar message whenever I try to connect from REBOL (either on the HP-UX box or my desktop box running Linux) to ANY ftp server. It looks like you have configured a generic proxy server for REBOL, and that server may no longer exist or may not be working correctly. That also explains why all FTP connections appear to be based on HTTP. Please check the set-net call in your user.r file and, if you don't need a proxy server, change "generic" to "none". -- Holger Kruse [EMAIL PROTECTED]
[REBOL] FTP problems -- mystery. Re:(4)
I'm passing this status report back to the list in case someone else gets bitten by a similar problem. SHORT VERSION: I have enough of a clue to get a workaround going, but still have concerns about how well REBOL and the corporate proxy server (Squid) are getting along. I also have what appears to be a bug in REBOL's handling of .../proxy/bypass entries. LONG VERSION: That thunderous CLICK! you heard a while ago was the light going on... I tracked this down with RickM, our intrepid sysadmin, looking over my shoulder (credit where credit is due). As Holger suspected, I did have a generic proxy server configured. This had been working since mid-April, and was necessary to get 'net traffic through our firewall (little useful things like 'upgrade!) The server software (Squid/2.3.STABLE2) and/or its configuration have changed in a way that is no longer compatible with REBOL. I can still hit the desired ftp server from within Netscape by using a URL of the form ftp://userid:[EMAIL PROTECTED]/ and get a listing of the top-level ftp directory space. If I use only the URL ftp://1.2.3.4/ I get an error message from Squid stating (correctly) that the server in question does not allow anonymous connections. Squid's error message, of course, is returned as HTML. If I disable proxy configuration for REBOL (comment out the set-net call in user.r) the ftp connection works. Re-enabling the proxy setting (de-commenting set-net and restarting REBOL) gets me the timeout again. S... Turning to Carl's draft version of REBOL Network Protocols, I tried adding to user.r (after the set-net call) the line system/schemes/default/proxy/bypass: ["1.2.*" "*.fedex.com"] (where the "1.2." was actually the prefix of the class B network in which the long-sought ftp server lives). Relaunching REBOL and attempting the same read ftp://... command as before now gets me a response of foo: read ftp://xxuseridxx:[EMAIL PROTECTED]/path/file.txt ** Script Error: Cannot use write on this type port. ** Where: write-io sub-port #{05020002} 4 read-io Hmmm... So maybe wild-carding doesn't work on dotted quads??? Next attempt: Go back to user.r and insert the lines system/schemes/ftp/proxy/host:false system/schemes/ftp/proxy/port-id: false system/schemes/ftp/proxy/type:false after the set-net call. Try to run script. IT WORKS! Next attempt: Assuming that my earlier problem was trying to use a wildcard in a dotted-quad host identifier, I commented out the three lines above and changed the proxy bypass setting per system/schemes/default/proxy/bypass: ["1.2.3.4" "*.fedex.com"] (where, of course, the read address appeared instead of the bogus class A address above). Again, I get a response of ** Script Error: Cannot use write on this type port. ** Where: write-io sub-port #{05020002} 4 read-io So, I'm now inclined to conclude that dotted quat host identifiers (as string data) are not acceptable in the .../proxy/bypass list. After re-inserting the .../ftp/proxy/... lines above (between the set-net call and the .../proxy/bypass: setting) I get the transfer to work correctly. All of the above experimentation has been done on the HP-UX box. After inserting the .../ftp/proxy/...: false lines into user.r on my desktop Linux box, it too is able to connect to the ftp server that is the object of my afflictions. QUESTIONS: I'm still concerned about some things here: 1) Why does a URL of the form ftp://user:pass@host/path/file.ext work for Netscape, but not for REBOL? I'll try to track down some SquidVolk on our side and find out what they changed before following up on this question. 2) Is "1.2.*" supposed to work in a .../proxy/bypass list? What about "1.2.3.4"? I know it's lame that the sysadmin of the ftp server gave me a dotted quad instead of a host name, but that IS a valid way to identify a host. These strike me as legimate bugs, unless someone can point out something dumb that I did (or should have done). Thanks! -jn- [EMAIL PROTECTED] wrote: On Mon, Sep 25, 2000 at 04:20:10PM -0500, [EMAIL PROTECTED] wrote: Thanks, Michal... But I believe the services on the host(s) are correct. It seems that I get a similar message whenever I try to connect from REBOL (either on the HP-UX box or my desktop box running Linux) to ANY ftp server. It looks like you have configured a generic proxy server for REBOL, and that server may no longer exist or may not be working correctly. That also explains why all FTP connections appear to be based on HTTP. Please check the set-net call in your user.r file and, if you don't need a proxy server, change "generic" to "none". -- Holger Kruse [EMAIL PROTECTED]
[REBOL] FTP Absolute Path Problem Re:(2)
Michael, thanks for the help. You are right, of course. If I ftp in from the command line, it takes me to the home directory of whoever I log in as. So, of course, Rebol will operate the same way. I'm going to try your soft-link idea. Thanks again for the help! On Mon, 18 Sep 2000, you wrote: I don't think this is an FTP issue; I believe the issue has to do with your machine's setup. Your machine recognizes your user name and sets your HOME path. Your machine forces FTP to prepend the HOME path. I could be wrong, but I don't think FTP can work around this. This is a security feature of the machine. You could always devise a work-around like %../../path or creating a soft-link (in your HOME directory) to the directory you want. - Michael Jelinek [EMAIL PROTECTED] on 09/18/2000 11:32:51 AM From: [EMAIL PROTECTED] on 09/18/2000 11:32 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: [REBOL] FTP Absolute Path Problem I'm having the following problem: I want to load a file that resides on a server under the absolute path of /var/local/ecdr/data/. However, when I use the ftp command, it always thinks I want to do relative addressing from my home directory. I have tried: records: load ftp://ecdr:[EMAIL PROTECTED]/var/local/ecdr/data/cdr_out and also: records: load ftp://ecdr:[EMAIL PROTECTED]//var/local/ecdr/data/cdr_out and even: records: load join ftp://ecdr:[EMAIL PROTECTED] %/var/local/ecdr/data/cdr_out but it always tells me that rebol is looking for "./var/local/ecdr/data/cdr_out". In other words, it is looking under /home/cribbsj/var/local/ecdr/data/cdr_out, which, of course, does not exist. In short, does anyone know how to make the ftp command use absolute path addressing as opposed to relative path addressing? Any help would be greatly appreciated! -- Jamey Cribbs Sr. Technical Consultant -- Jamey Cribbs Sr. Technical Consultant
[REBOL] FTP Absolute Path Problem
I'm having the following problem: I want to load a file that resides on a server under the absolute path of /var/local/ecdr/data/. However, when I use the ftp command, it always thinks I want to do relative addressing from my home directory. I have tried: records: load ftp://ecdr:[EMAIL PROTECTED]/var/local/ecdr/data/cdr_out and also: records: load ftp://ecdr:[EMAIL PROTECTED]//var/local/ecdr/data/cdr_out and even: records: load join ftp://ecdr:[EMAIL PROTECTED] %/var/local/ecdr/data/cdr_out but it always tells me that rebol is looking for "./var/local/ecdr/data/cdr_out". In other words, it is looking under /home/cribbsj/var/local/ecdr/data/cdr_out, which, of course, does not exist. In short, does anyone know how to make the ftp command use absolute path addressing as opposed to relative path addressing? Any help would be greatly appreciated! -- Jamey Cribbs Sr. Technical Consultant
[REBOL] FTP Absolute Path Problem Re:
I don't think this is an FTP issue; I believe the issue has to do with your machine's setup. Your machine recognizes your user name and sets your HOME path. Your machine forces FTP to prepend the HOME path. I could be wrong, but I don't think FTP can work around this. This is a security feature of the machine. You could always devise a work-around like %../../path or creating a soft-link (in your HOME directory) to the directory you want. - Michael Jelinek [EMAIL PROTECTED] on 09/18/2000 11:32:51 AM From: [EMAIL PROTECTED] on 09/18/2000 11:32 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: [REBOL] FTP Absolute Path Problem I'm having the following problem: I want to load a file that resides on a server under the absolute path of /var/local/ecdr/data/. However, when I use the ftp command, it always thinks I want to do relative addressing from my home directory. I have tried: records: load ftp://ecdr:[EMAIL PROTECTED]/var/local/ecdr/data/cdr_out and also: records: load ftp://ecdr:[EMAIL PROTECTED]//var/local/ecdr/data/cdr_out and even: records: load join ftp://ecdr:[EMAIL PROTECTED] %/var/local/ecdr/data/cdr_out but it always tells me that rebol is looking for "./var/local/ecdr/data/cdr_out". In other words, it is looking under /home/cribbsj/var/local/ecdr/data/cdr_out, which, of course, does not exist. In short, does anyone know how to make the ftp command use absolute path addressing as opposed to relative path addressing? Any help would be greatly appreciated! -- Jamey Cribbs Sr. Technical Consultant
[REBOL] FTP error Re:
With a trace/net on, one can see that Rebol parses internally the URL, and I'm wondering if this is not the source of the problem : URL Parse: myname password ftp.xoom.com none backup/ FRANCO22 final.DWP Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." Net-log: [ ["TYPE A"] ["200"]] Net-log: "200 Type set to A." Net-log: [ [join "LIST " port/target] ["150" "125"]] Net-log: {150 Opening ASCII mode data connection for /bin/ls.} Net-log: [ none "226"] Net-log: "226 Transfer complete." Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." ** Access Error: Port none not open. ** Where: read/binary join xoom file So, is this a bug? Hello, Here is the result of an interactive console session after typing xoom: ftp://myname:[EMAIL PROTECTED]/backup/ and read join xoom %"spaces in file.txt" As you can see at the bottom, the error is : ** Access Error: Port none not open. ** Where: read join xoom %spaces%20in%20file.txt URL Parse: myname password ftp.xoom.com none backup/ spaces in file.txt Net-log: ["Opening tcp for" FTP] connecting to: ftp.xoom.com Net-log: [ none ["220" "230"]] Net-log: {220 ftp.xoom.com FTP server (Version XOOM FTP 1.24.3+local-release Fri Aug 28 15:52:40 P DT 1998) ready.} Net-log: [ ["USER" port/user] "331"] Net-log: "331 Password required for myname." Net-log: [ ["PASS" port/pass] "230"] Net-log: "230 User myname logged in." Net-log: [ "SYST" "215"] Net-log: "215 UNIX Type: L8 Version: BSD-199506" Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." Net-log: [ ["CWD" either empty? port/path ["./"] [join "./" port/path]] "250"] Net-log: "250 CWD command successful." Net-log: [ ["TYPE A"] ["200"]] Net-log: "200 Type set to A." Net-log: [ [join "LIST " port/target] ["150" "125"]] Net-log: {150 Opening ASCII mode data connection for /bin/ls.} Net-log: [ none "226"] Net-log: "226 Transfer complete." Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." ** Access Error: Port none not open. ** Where: read join xoom %spaces%20in%20file.txt -- Fantam
[REBOL] FTP error Re:(2)
Are you perhaps behind a firewall? It looks like REBOL's FTP protocol is having trouble establishing the active connection for the data. Try setting: system/schemes/ftp/passive: true and try it again. Sterling With a trace/net on, one can see that Rebol parses internally the URL, and I'm wondering if this is not the source of the problem : URL Parse: myname password ftp.xoom.com none backup/ FRANCO22 final.DWP Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." Net-log: [ ["TYPE A"] ["200"]] Net-log: "200 Type set to A." Net-log: [ [join "LIST " port/target] ["150" "125"]] Net-log: {150 Opening ASCII mode data connection for /bin/ls.} Net-log: [ none "226"] Net-log: "226 Transfer complete." Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." ** Access Error: Port none not open. ** Where: read/binary join xoom file So, is this a bug?
[REBOL] FTP error Re:(3)
Are you perhaps behind a firewall? It looks like REBOL's FTP protocol is having trouble establishing the active connection for the data. Try setting: system/schemes/ftp/passive: true and try it again. I do have a personal firewall solution on my standalone pc, but even when I turn it off, the problem remains the same. Also, when I turn passive ftp on, I get this : foreach dir xom [print dir text: read join xoom dir] BFRENCH.DWP connecting to: ftp.xoom.com ** User Error: Server error: tcp connection failed. ** Where: text: read join xoom dir When I turn it off again, everything's fine but same as above: filenames with spaces can't be read. Sterling With a trace/net on, one can see that Rebol parses internally the URL, and I'm wondering if this is not the source of the problem : URL Parse: myname password ftp.xoom.com none backup/ FRANCO22 final.DWP Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." Net-log: [ ["TYPE A"] ["200"]] Net-log: "200 Type set to A." Net-log: [ [join "LIST " port/target] ["150" "125"]] Net-log: {150 Opening ASCII mode data connection for /bin/ls.} Net-log: [ none "226"] Net-log: "226 Transfer complete." Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." ** Access Error: Port none not open. ** Where: read/binary join xoom file So, is this a bug? -- Fantam
[REBOL] FTP error
Hello, Here is the result of an interactive console session after typing xoom: ftp://myname:[EMAIL PROTECTED]/backup/ and read join xoom %"spaces in file.txt" As you can see at the bottom, the error is : ** Access Error: Port none not open. ** Where: read join xoom %spaces%20in%20file.txt URL Parse: myname password ftp.xoom.com none backup/ spaces in file.txt Net-log: ["Opening tcp for" FTP] connecting to: ftp.xoom.com Net-log: [ none ["220" "230"]] Net-log: {220 ftp.xoom.com FTP server (Version XOOM FTP 1.24.3+local-release Fri Aug 28 15:52:40 P DT 1998) ready.} Net-log: [ ["USER" port/user] "331"] Net-log: "331 Password required for myname." Net-log: [ ["PASS" port/pass] "230"] Net-log: "230 User myname logged in." Net-log: [ "SYST" "215"] Net-log: "215 UNIX Type: L8 Version: BSD-199506" Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." Net-log: [ ["CWD" either empty? port/path ["./"] [join "./" port/path]] "250"] Net-log: "250 CWD command successful." Net-log: [ ["TYPE A"] ["200"]] Net-log: "200 Type set to A." Net-log: [ [join "LIST " port/target] ["150" "125"]] Net-log: {150 Opening ASCII mode data connection for /bin/ls.} Net-log: [ none "226"] Net-log: "226 Transfer complete." Net-log: [ ["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." ** Access Error: Port none not open. ** Where: read join xoom %spaces%20in%20file.txt -- Fantam
[REBOL] FTP problems?
Hello all, I have been using a script to upload web pages to my site weekly using Core 2.2 on my Windows NT machine. After upgrading to Core 2.3, I've noticed that when uploading with FTP, it doesn't seem to be able to login properly. (Windows's plain FTP utility works though.) Unfortunately, I no longer have a copy of Core 2.2 handy to see if it was the difference. Has anyone else noticed FTP having problems on Core 2.3 on Windows? Thanks, Alfred
[REBOL] FTP problems? Re:
It might be your firewall, if you have one. The 2.3 release needs to have a line: system/schemes/ftp/passive: on in order to run in passive mode. Not very user friendly, sorry. 2.2 did it automatically, but this mode cannot be reliably detected on some firewalls. I'm think that we need to detect it better under 2.3... and do at least as well as 2.2 in guessing at it. -Carl At 7/20/00 02:09 PM -0700, you wrote: Hello all, I have been using a script to upload web pages to my site weekly using Core 2.2 on my Windows NT machine. After upgrading to Core 2.3, I've noticed that when uploading with FTP, it doesn't seem to be able to login properly. (Windows's plain FTP utility works though.) Unfortunately, I no longer have a copy of Core 2.2 handy to see if it was the difference. Has anyone else noticed FTP having problems on Core 2.3 on Windows? Thanks, Alfred
[REBOL] FTP crashes rebol Re:(6)
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I've hacked the ftp protocol so you can do "read/custom ftp://ftp.rebol.com/test.txt [restart 10]", which starts downloading the test.txt file, but skipping the first 10 bytes. It's only a very minor hack too... the same thing could be done for http servers that support restarting, but that might be a little more complex. REBOL ftp protocol doesn't support above feature by default? No, it uses a particular ftp command, which some ftp servers don't support (if they're old). I've also noticed that using the /part refinement with ftp, the whole file is read, even if you only want a single byte - Julian Kinraid
[REBOL] FTP on Mac PPC?
I have REBOL/Core running on 3 machines at work: A Windows 98 box, A Mac PPC G4 (OS 9), A Mac PPC G3 (OS 8.6). All 3 machines are behind a firewall and use the same settings for browser and ftp programs. HTTP functions in REBOL/Core work great for all 3 machines. However, while FTP in REBOL/Core works great on the Windows machine it does not work at all on either Mac. Here's an example of what I get on the Macs: read ftp://ftp.rebol.com connecting to: ftp.rebol.com ** User Error: Server error: tcp 500 cannot decode port specified. ** Where: read ftp://ftp.rebol.com All 3 machines have the latest available REBOL/Core if I run "upgrade". All 3 have the same "user.r" settings as well as matching ftp system schemes. Each Mac has at least two other FTP programs that work fine and use the same proxy settings as the PC. Any ideas? Thanks, Joel Lawhead SunHerald.com MississippiCoast.com
[REBOL] FTP crashes rebol Re:(2)
Sterling, in your note to Tim to say that append should work, although it would be slow and inefficient. Is this really true? I didn't think you could modify parts of files using FTP. What can FTP really do? -galt
[REBOL] FTP crashes rebol Re:(2)
Hi Sterling: Sorry, your modification resulted in a crash also. write/append DstFile [line newline] Be interesting to see if there are different results regarding other OS's. Windows isn't all that stable anyway. Oh well! -Tim At 10:50 PM 6/5/00 -0700, you wrote: Well, this is untested code as I'm crunching away on some other stuff, but try: foreach line text [ print line write/append DstFile [line newline] ;HOPEFULLY DOES NOT CRASH HERE!! ] instead. Yes it's probably _very_ slow plus the other thing should never crash REBOL. That will be looked into. Sterling I'm reposting this, as I've had no takers from the previous, and I note that Holger may be monitoring I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. (Current version of view). Here's the code, I'd welcome comments. ; DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile ;print type? text DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] close DstPort ; I am running from a Win NT 4.0 Workstation Platform with upgrade ; 5.0 ; I am writing to a Linux machine. I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. TIA Tim
[REBOL] FTP crashes rebol Re:(3)
FTP can do quite a number of things... we don't implement them all because the "standard" or "required" set of commands is rather small and support for the extra features is not guaranteed. Within REBOL right now, you can: read, write, append to, delete, and rename files read, make, delete, and rename dirs I think that's the list. However, the FTP protocol itself has many other commands that are optionally supported by servers. There is a command to restart a broken transfer at a specified point, and a few that can specify the structure of the target file system or file to be used... I'm not really dure how they get used or how many servers implement stuff like that. Append is probably the only thing there you didn't know about. FTP cannot do any mid-file editing within the protocol... for that you'd have to transfer the whole file back and forth and do the edit locally. It might be neat to implement some way to get that download restart command worked in but how do you put that info into the URL? Sterling Sterling, in your note to Tim to say that append should work, although it would be slow and inefficient. Is this really true? I didn't think you could modify parts of files using FTP. What can FTP really do? -galt
[REBOL] FTP crashes rebol Re:(3)
Really? It worked for me... but I'm on Linux. Try it with 'trace/net on' trace/net on DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile foreach line text [ write/append DstFile join line newline ] So if you do that to a small file (just 2-3 lines), what does the trace show is happening? Sterling Hi Sterling: Sorry, your modification resulted in a crash also. write/append DstFile [line newline] Be interesting to see if there are different results regarding other OS's. Windows isn't all that stable anyway. Oh well! -Tim At 10:50 PM 6/5/00 -0700, you wrote: Well, this is untested code as I'm crunching away on some other stuff, but try: foreach line text [ print line write/append DstFile [line newline] ;HOPEFULLY DOES NOT CRASH HERE!! ] instead. Yes it's probably _very_ slow plus the other thing should never crash REBOL. That will be looked into. Sterling I'm reposting this, as I've had no takers from the previous, and I note that Holger may be monitoring I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. (Current version of view). Here's the code, I'd welcome comments. ; DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile ;print type? text DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] close DstPort ; I am running from a Win NT 4.0 Workstation Platform with upgrade ; 5.0 ; I am writing to a Linux machine. I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. TIA Tim
[REBOL] FTP crashes rebol Re:(4)
If I were you I would change NT to SP 6a, version 5 was very very bad, and got replaced quickly by Micro$haft. We installed it in several machines that had Sp4 and the computers that were reliable with SP 4 had nothing but problems so we stopped installing it. SP 6 is very stable though. At 12:14 PM 06/06/2000 -0700, you wrote: Really? It worked for me... but I'm on Linux. Try it with 'trace/net on' trace/net on DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile foreach line text [ write/append DstFile join line newline ] So if you do that to a small file (just 2-3 lines), what does the trace show is happening? Sterling Hi Sterling: Sorry, your modification resulted in a crash also. write/append DstFile [line newline] Be interesting to see if there are different results regarding other OS's. Windows isn't all that stable anyway. Oh well! -Tim At 10:50 PM 6/5/00 -0700, you wrote: Well, this is untested code as I'm crunching away on some other stuff, but try: foreach line text [ print line write/append DstFile [line newline] ;HOPEFULLY DOES NOT CRASH HERE!! ] instead. Yes it's probably _very_ slow plus the other thing should never crash REBOL. That will be looked into. Sterling I'm reposting this, as I've had no takers from the previous, and I note that Holger may be monitoring I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. (Current version of view). Here's the code, I'd welcome comments. ; DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile ;print type? text DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] close DstPort ; I am running from a Win NT 4.0 Workstation Platform with upgrade ; 5.0 ; I am writing to a Linux machine. I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. TIA Tim
[REBOL] FTP crashes rebol Re:(4)
Hi Sterling Append is probably the only thing there you didn't know about. FTP cannot do any mid-file editing within the protocol... for that you'd have to transfer the whole file back and forth and do the edit locally. And that works just fine -Tim
[REBOL] FTP crashes rebol Re:(5)
Thank you!! That's a great tip. Do you by any chance have a link to that? Regards -Tim At 02:28 PM 6/6/00 -0500, you wrote: If I were you I would change NT to SP 6a, version 5 was very very bad, and got replaced quickly by Micro$haft. We installed it in several machines that had Sp4 and the computers that were reliable with SP 4 had nothing but problems so we stopped installing it. SP 6 is very stable though. At 12:14 PM 06/06/2000 -0700, you wrote: Really? It worked for me... but I'm on Linux. Try it with 'trace/net on' trace/net on DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile foreach line text [ write/append DstFile join line newline ] So if you do that to a small file (just 2-3 lines), what does the trace show is happening? Sterling Hi Sterling: Sorry, your modification resulted in a crash also. write/append DstFile [line newline] Be interesting to see if there are different results regarding other OS's. Windows isn't all that stable anyway. Oh well! -Tim At 10:50 PM 6/5/00 -0700, you wrote: Well, this is untested code as I'm crunching away on some other stuff, but try: foreach line text [ print line write/append DstFile [line newline] ;HOPEFULLY DOES NOT CRASH HERE!! ] instead. Yes it's probably _very_ slow plus the other thing should never crash REBOL. That will be looked into. Sterling I'm reposting this, as I've had no takers from the previous, and I note that Holger may be monitoring I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. (Current version of view). Here's the code, I'd welcome comments. ; DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile ;print type? text DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] close DstPort ; I am running from a Win NT 4.0 Workstation Platform with upgrade ; 5.0 ; I am writing to a Linux machine. I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. TIA Tim
[REBOL] FTP crashes rebol Re:(6)
http://www.microsoft.com/ntworkstation/ Might not solve your particular problem, but would help in having a more stable system. At 12:26 PM 06/06/2000 -0800, you wrote: Thank you!! That's a great tip. Do you by any chance have a link to that? Regards -Tim At 02:28 PM 6/6/00 -0500, you wrote: If I were you I would change NT to SP 6a, version 5 was very very bad, and got replaced quickly by Micro$haft. We installed it in several machines that had Sp4 and the computers that were reliable with SP 4 had nothing but problems so we stopped installing it. SP 6 is very stable though. At 12:14 PM 06/06/2000 -0700, you wrote: Really? It worked for me... but I'm on Linux. Try it with 'trace/net on' trace/net on DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile foreach line text [ write/append DstFile join line newline ] So if you do that to a small file (just 2-3 lines), what does the trace show is happening? Sterling Hi Sterling: Sorry, your modification resulted in a crash also. write/append DstFile [line newline] Be interesting to see if there are different results regarding other OS's. Windows isn't all that stable anyway. Oh well! -Tim At 10:50 PM 6/5/00 -0700, you wrote: Well, this is untested code as I'm crunching away on some other stuff, but try: foreach line text [ print line write/append DstFile [line newline] ;HOPEFULLY DOES NOT CRASH HERE!! ] instead. Yes it's probably _very_ slow plus the other thing should never crash REBOL. That will be looked into. Sterling I'm reposting this, as I've had no takers from the previous, and I note that Holger may be monitoring I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. (Current version of view). Here's the code, I'd welcome comments. ; DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile ;print type? text DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] close DstPort ; I am running from a Win NT 4.0 Workstation Platform with upgrade ; 5.0 ; I am writing to a Linux machine. I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. TIA Tim
[REBOL] FTP Problem Re:
Howdy, fellow allumn: Sometimes FTP has problems if it's not in passive mode. Set it my doing the following: system/schemes/ftp/passive: on Then try your upload. If that doesn't clear it up, do the following: trace/net on echo %ftp.log write ftp://user:[EMAIL PROTECTED]/test.txt "test" echo off trace/net off That will produce a bunch of raw transaction output helpful for debugging. After it's done, mail the resulting ftp.log to [EMAIL PROTECTED] with a subject indicating a problem with the messiest protocol known to the web: FTP. Good luck! -jeff Hello, folks. I'm having a major FTP problem. write ftp://user:[EMAIL PROTECTED]/test.txt "test" works fine, but write ftp://user:[EMAIL PROTECTED]/test.txt "test" bails with this message: ** Script Error: pick expected series argument of type: series pair event money date time object port tuple any-function. ** Where: pick server-said 4 Anyone know what the problem could be? It's something with the azorius.com server, but is there anything in particular that I could talk to the server manager about? Thanks, Justin Smith
[REBOL] FTP crashes rebol
I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. (Current version of view). Here's the code, I'd welcome comments. ; DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile ;print type? text DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] close DstPort ; I am running from a Win NT 4.0 Workstation Platform with upgrade ; 5.0 ; I am writing to a Linux machine. I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. TIA Tim
[REBOL] FTP crashes rebol
I'm reposting this, as I've had no takers from the previous, and I note that Holger may be monitoring I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. (Current version of view). Here's the code, I'd welcome comments. ; DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile ;print type? text DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] close DstPort ; I am running from a Win NT 4.0 Workstation Platform with upgrade ; 5.0 ; I am writing to a Linux machine. I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. TIA Tim
[REBOL] FTP crashes rebol Re:
Tim, I don't know much about FTP, but what I have come to expect is that you can copy, delete, rename files and directories. FTP probably stands for Files Transfer Protocol. My guess is that it works basically at the level of a whole file, so trying to open and edit a file live on the FTP server seems outside the bounds of what it's supposed to be all about. Maybe you need FSP, file server protocol. just kidding ;-) p.s. I almost never use FTP, so what do I know?
[REBOL] FTP crashes rebol Re:
On Mon, 5 Jun 2000 [EMAIL PROTECTED] wrote: I'm reposting this, as I've had no takers from the previous, and I note that Holger may be monitoring I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. clip DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] clip I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. Hi Tim, You can't do that. FTP is for transferring whole files. If you really want to append to the file on the server, you'll have to use NFS or Samba to remote-mount the filesystem. On the other hand, REBOL shouldn't crash, it should probably give an error message advising that you can't insert into an ftp:// port. Cheers, Kev
[REBOL] FTP crashes rebol Re:(2)
Thanks Kev: At 07:33 PM 6/5/00 -0700, you wrote: clip DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] clip I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. Hi Tim, You can't do that. FTP is for transferring whole files. If you really want to append to the file on the server, you'll have to use NFS or Samba to remote-mount the filesystem. I CAN append to a file, just can't rewrite it. I'm just learning what rebol can and can't do. I can't do it with C either - FTPing the rewritten file works just fine. :) On the other hand, REBOL shouldn't crash, it should probably give an error message advising that you can't insert into an ftp:// port. Exactly... -Tim Cheers, Kev
[REBOL] FTP crashes rebol Re:(2)
Tim, I don't know much about FTP, but what I have come to expect is that you can copy, delete, rename files and directories. Yep, I'm just stretching the limites of what the protocol can do. FTP probably stands for Files Transfer Protocol. My guess is that it works basically at the level of a whole file, so trying to open and edit a file live on the FTP server seems outside the bounds of what it's supposed to be all about. Correct... But I'm surprised rebol doesn't step in with an error message Maybe you need FSP, file server protocol. just kidding ;-) Isn't that what "roll your own" is about :) thanks for the input -Tim p.s. I almost never use FTP, so what do I know?
[REBOL] FTP crashes rebol Re:
Well, this is untested code as I'm crunching away on some other stuff, but try: foreach line text [ print line write/append DstFile [line newline] ;HOPEFULLY DOES NOT CRASH HERE!! ] instead. Yes it's probably _very_ slow plus the other thing should never crash REBOL. That will be looked into. Sterling I'm reposting this, as I've had no takers from the previous, and I note that Holger may be monitoring I have tried a couple of different approaches to rewrite a file and an FTP site, and the result is always that rebol crashes and Dr. Watson intervenes. (Current version of view). Here's the code, I'd welcome comments. ; DstFile: ftp://usr:[EMAIL PROTECTED]/log.txt SrcFile: ftp://usr:[EMAIL PROTECTED]/log.bak text: read/lines DstFile if exists? SrcFile [delete SrcFile] rename DstFile SrcFile ;print type? text DstPort: open/new/write DstFile foreach line text [ print line append DstPort [line newline] ;CRASHES HERE!! ] close DstPort ; I am running from a Win NT 4.0 Workstation Platform with upgrade ; 5.0 ; I am writing to a Linux machine. I can make this work if I do the rewrite on my machine and then FTP it to the site, but it would be just wonderful if I can do the backup and editing at the site. TIA Tim
[REBOL] FTP Problem
Hello, folks. I'm having a major FTP problem. write ftp://user:[EMAIL PROTECTED]/test.txt "test" works fine, but write ftp://user:[EMAIL PROTECTED]/test.txt "test" bails with this message: ** Script Error: pick expected series argument of type: series pair event money date time object port tuple any-function. ** Where: pick server-said 4 Anyone know what the problem could be? It's something with the azorius.com server, but is there anything in particular that I could talk to the server manager about? Thanks, Justin Smith
[REBOL] FTP help needed!
Hi Rebols, I know probably everyody here is tired of seeing newbie's troubles with FTP. But there's no other place where I can ask for help :) The attached script crashes everytime after the fourth downloaded file and Windows issues the following warning: "REBOL caused an invalid page fault in module KERNEL32.DLL at 015f:bff87eb5. Registers: EAX=c00300f0 CS=015f EIP=bff87eb5 EFLGS=00010212 EBX= SS=0167 ESP=0055fff4 EBP=00560060 ECX= DS=0167 ESI=815ec7e0 FS=3c1f EDX=c00300f4 ES=0167 EDI=815ec9ec GS= Bytes at CS:EIP: 53 56 57 8b 30 83 7d 10 01 8b 4e 38 89 4d f8 75 Stack dump:" What am I doing wrong? Can anyone test the script for me? Don't forget to create a folder c:\tvprog (it's where the script dowloads the files to) Thank you very much Carlos Lorenz REBOL [ title: "LisTV" file:%listv.r date:[10-jan-2000] lstupd: [11-apr-2000] file:"%listv.r" version: 1.0 author: "Carlos Lorenz" email: [EMAIL PROTECTED] purpose: {multiple dowloads from FTP site LisTV} ] grids: [ 1 "CMT.TXT" "CMT" 2 "CNE.TXT" "CNN Espanhol" 3 "CNN.TXT" "CNN Int" 4 "CUL.TXT" "CULTURA" 5 "DWL.TXT" "DEUTSCHE WELLE" 6 "DIK.TXT" "DISCOVERY KIDS" 7 "DIS.TXT" "DISCOVERY" 8 "ECO.TXT" "ECO" 9 "EET.TXT" "E!" 10 "ESB.TXT" "ESPN Brasil" 11 "ESP.TXT" "ESPN Int" 12 "EUR.TXT" "EUROCHANNEL" 13 "BRA.TXT" "FILM ARTS" 14 "FOX.TXT" "FOX" 15 "KID.TXT" "FOX KIDS" 16 "FUT.TXT" "FUTURA" 17 "GNT.TXT" "GNT" 18 "HAL.TXT" "HALLMARK" 19 "HBO.TXT" "HBO" 20 "HB2.TXT" "HB2" ] grid-search: make function! [series seek where] [ grid: find series seek if where == "rec" [ return first grid ] if where == "file" [ return second grid] ] local-date: make function! [some-date [date!] ][ months: [2 4 5 8 9 12] locale-months: ["-Fev-" "-Abr-" "-Mai-" "-Ago-" "-Set-" "-Dez-"] if found? find months some-date/month[ return join some-date/day [pick locale-months index? find months some-date/month some-date/year] ] return some-date ] left: func [str num][copy/part str num] right: func [str num][copy skip tail str negate num] substr: func [str num length][copy/part at str num length] user: "tvprog" pass: "znerol01" ;remore server site: to-url join "ftp://" [user ":" pass "@ftp.intermega.com.br/REBOL/Scripts/"] sitedata: to-url join "ftp://" [user ":" pass "@ftp.intermega.com.br/REBOL/Txt/"] ; local server ;site: ftp://127.0.0.1/ ;sitedata: ftp://127.0.0.1/txt/ print "^Lconnecting to FTP site TVProg" either not exists? %../tvprog/lista.cf[ print trim {^LAvailable TV Listings at LisTV: 1 CMT 10 ESPN Brasil 2 CNN Espanhol 11 ESPN Int 3 CNN Int 12 EUROCHANNEL 4 CULTURA 13 FILM ARTS 5 DEUTSCHE WELLE 14 FOX 6 DISCOVERY KIDS 15 FOX KIDS 7 DISCOVERY16 FUTURA 8 ECO 17 GNT 9 E! 18 HALLMARK 19 HBO 20 HBO2 } go-out: true print trim {Enter the code numbers of the lists you want to download separated by spaces. For example: 05 20 24 34 78 04 and press Enter. In c:\tvprog\lista.cf you'll find the names of channels you chose. To alter your selection just delete the file [lista.cf] before running the script again. The downloaded lists will be saved in c:\tvprog\tvprog.txt. } a: ask "Code numbers? : " if a == "" [quit] args: make block! parse a "-" print join newline ["Wait..." newline] foreach arg args[ if greater? arg "20" [ arg: "20" ] if lesser? arg "0" [ arg: "1" ] if equal? arg "0" [ arg: "1" ] nfile: grid-search grids (to-integer arg) "file" write/append %../tvprog/lista.cf join nfile newline files: make block! read %../tvprog/lista.cf ] ][ files: make block! read %../tvprog/lista.cf ] if error? try [write %../tvprog/tvprog.txt join read site/header.txt [newline newline]][ print "^LDial-up connection error detected! Try to reconnect." wait 3 quit ] foreach file files [ if (length? (to-string file)) 7 [ print "^LFile c:\tvprog\lista.cf corrupted!" print "Please delete it and run the script again." wait 4 quit ] nfile:
[REBOL] FTP and recycle
Hi Last week I complained about problems with FTP. After a sleepless night and tracing down a few variants, I could get rid of the problems. I inserted a "recycle on" in my main loop. After that everything went fine. In that context I noticed, that " probe system/schemes/ftp" is possible before any ftp action, but locks REBOL completely after the first successful ftp action. AR -- Sent through GMX FreeMail - http://www.gmx.net
[REBOL] ftp - tcp 500 illegal port
Win98 2.2.0.3.1 I open a REBOL console, dialin to my ISP and try ftp'ing to my website read ftp://edmunds:[EMAIL PROTECTED]/ I get this error msg: ***User Error: Server error: tcp 500 Illegal PORT rejected (address wrong).. Still connected, I open a new REBOL console and type exactly the same line read ftp://edmunds:[EMAIL PROTECTED]/ This time, I get the directly listing. I go back to the first console, same server error msg. I disconnected (leaving the second console -- the one that got thru -- still open). I reconnected to my ISP and typed: read ftp://edmunds:[EMAIL PROTECTED]/ again. Now that one gives me the server error! I open a new REBOL console, and get thru. Is this a known bug? -- What's going on? Doug Edmunds 4 April 2000 YOU'RE PAYING TOO MUCH FOR THE INTERNET! Juno now offers FREE Internet Access! Try it today - there's no risk! For your FREE software, visit: http://dl.www.juno.com/get/tagj.
[REBOL] FTP Connection problems
Hello, i'm having 2 problems using FTP. 1.When i try to connect to my ISP, i always get the Network timeout message. I have changed the timeout to 10 minutes but still get the same error. I am able to connect using the ftp exec supplied with Win98. The only difference i see is that using the WIN98 ftp is that it "Opening ASCII mode data connection for /bin/ls." whereas the REBOL ftp uses BINARY mode?? read ftp://uuu:[EMAIL PROTECTED]/ URL Parse: uuu xxx home.gci.net none none none Net-log: ["Opening tcp for" FTP] connecting to: home.gci.net Net-log: [ none ["220" "230"]] Net-log: {220 firebird.gci.net FTP server (Version wu-2.6.0(2) Wed Jan 5 11:31:52 AKST 2000) ready .} Net-log: [["USER" port/user] "331"] Net-log: "331 Password required for uuu." Net-log: [["PASS" port/pass] "230"] Net-log: "230 User uuu logged in." Net-log: [ "TYPE I" "200"] Net-log: "200 Type set to I." Net-log: [["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." Net-log: [["CWD ~"] "250"] Net-log: "250 CWD command successful." Net-log: [["CWD" either empty? port/path ["./"] [join "./" port/path]] "250"] Net-log: "250 CWD command successful." Net-log: [["LIST" "."] ["150" "125"]] Net-log: {150 Opening BINARY mode data connection for /bin/ls.} Net-log: [ none "226"] ** Access Error: Network timeout. ** Where: read ftp://uuu:[EMAIL PROTECTED]/ 2. Connecting to an IBM mainframe always gives the following error message. Win 98 ftp connects correctly read ftp://uuu:[EMAIL PROTECTED]/ URL Parse: uuu xxx jdc1.state.ak.us none none none Net-log: ["Opening tcp for" FTP] connecting to: jdc1.state.ak.us Net-log: [ none ["220" "230"]] Net-log: {220-FTPSERVE IBM MVS V3R1 at JDC1.STATE.AK.US, 09:01:39 on 03/29/00} Net-log: {220 Connection will close if idle for more than 5 minutes.} Net-log: [["USER" port/user] "331"] Net-log: "331 Send password please." Net-log: [["PASS" port/pass] "230"] Net-log: "230 uuu is logged on." Net-log: [ "TYPE I" "200"] Net-log: "200 Representation type is IMAGE." Net-log: [["PORT" port/locals/active-check] "200"] Net-log: "200 Port request OK." Net-log: [["CWD ~"] "250"] Net-log: [["CWD /"] "250"] ** User Error: Server error: tcp 550 A qualifier in "/" begins with an invalid character.. ** Where: read ftp://uuu:[EMAIL PROTECTED]/
[REBOL] FTP Re:(4)
I use the name form too. What OS do you use ? I use Win. regards AR It has been noted before that there is an ftp bug when using the ip address instead of the server name. To avoid the problem make sure you use ftp://ftp.rebol.com and not ftp://207.69.132.8 Not sure if this relates to your ftp problem though. I made that change in one of my scripts that runs in a forever loop on a permanent connection. It has currently been running with no problems for over 1000 hours. Prior to making the change it would lock up the system after a random number of downloads or connections. Cheers, Allen K -- Sent through GMX FreeMail - http://www.gmx.net
[REBOL] FTP Re:
Hi rebels :-) I use REBOL running under Win as a gateway between different computer architectures. If I access files via ftp in a loop, my REBOL always crashes. My operation with FTP crashes too. I am getting mails from POP3 server. (MAil about REBOL from rebol list) Next I am writing it into FTP at 50megs.com. Rebol running under Win98. 50megs may be under linux? 70% operation is OK. 30% operation crasched. Script is running 5- 10 times daily since 1 week. Jan Regent
[REBOL] FTP Re:(2)
Hi With FTP REBOL crashes after reading every four to eight files in a loop. This problems does not happen, if I use FTP from the console. When I check via the file system every one to ten seconds, read and write files and transfer messages via TCP (low level read-io and write-io) and retry in case of communication errors (either file or TCP), I process around one to two thousand messages per day and instance for around one month without interruption . Unfortunately other applications bring WinNT down then. I hope, that the FTP implemetation will become stable in the same way. AR -- Sent through GMX FreeMail - http://www.gmx.net
[REBOL] FTP Re:(4)
Allen K wrote: It has been noted before that there is an ftp bug when using the ip address instead of the server name. To avoid the problem make sure you use ftp://ftp.rebol.com and not ftp://207.69.132.8 I am using ftp://ftp.rebol.com form. my FTP script example: --- site: ftp://user:[EMAIL PROTECTED] fullsite: join site someDir foreach file uploadfiles [ fullsite-path: join fullsite file ;print ["fullsite-path:" fullsite-path] prin ["uploading: " file] write/binary fullsite-path read/binary file print [" upload finished"] ] Its better solution , may be with OPEN function? Allen, send some example, please :-) by Jan Regent
[REBOL] FTP
Hello I know, that there are many problems reported with the current implementation of FTP. I use REBOL running under Win as a gateway between different computer architectures. If I access files via ftp in a loop, my REBOL always crashes. If I access them via the the file mapping of the OS, I do not have a problem. Just a test of the list too. AR -- Sent through GMX FreeMail - http://www.gmx.net
[REBOL] FTP timeout
Hi Rebols, I wrote this script that performs a simple download via FTP and it works pretty good. When I try to run it trough Windows shortcut in order to pass parameters -sq to REBOL, it has troubles in connecting to FTP site. It's just like some sort o timeout is occurring Anyone else here has experienced it? Thank you Carlos
[REBOL] ftp limits? Re:(5)
Hi Sterling The error I usuall get is : print read ftp2://anonymous:[EMAIL PROTECTED]/aix/fixes/cad/other/catia_ oem_v4/IRIX/ ** Script Error: pick expected series argument of type: series money date time object port tuple any-function. ** Where: pick server-said 4 I tried creating a new ftp protocol as suggested re #2451 --- net-utils/net-install FTP2 self 21, but as above you eventually get the same error. I have tried this both through our firewall (socks45) and direct, on Windows AIX but without success. Using Leap-ftp through the firewall I get the dir-list ok - every time, although it is slow - Leap-ftp log is - 257 "/aix/fixes/cad/other/catia_oem_v4/IRIX" is current directory. TYPE A 200 Type set to A. PASV 227 Entering Passive Mode (194,196,0,2,54,0) LIST 150 Opening ASCII mode data connection for /bin/ls. 226 Transfer complete. Transfer done: 137442 bytes in 249.207 secs (0.55 k/sec) Hope that throws some light on the problem Nigel - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 01, 2000 7:16 PM Subject: [REBOL] ftp limits? Re:(4) Somebody will take a look at it. I did manage to get the same server response error which I think is generated if the server times out before REBOL does and closes the connection. REBOL expects to hear something back and does not so it fails to parse the empty response. Thanks for the info Larry, Nigel. Sterling
[REBOL] ftp limits? Re:(2)
Thanks for that. The directory that causes the problem is set drwxr-xr-x and all the files are -r--r--r--. So I don't think this is the same problem. This certainly looks like a bug in Rebol to me. The directory downloaded through an ftp client results in a 137k download (about 1500 files). I suspect the problem is caused by the number of files. I really do need an answer on this - if Rebol cannot do what I want I need save my efforts and look elsewhere. If anyone want to give it a try... system/schemes/default/timeout: 1000 print read ftp://anonymous:[EMAIL PROTECTED]/aix/fixes/cad/other/catia_o em_v4/IRIX/ Replace email_address with you correct email address (all activity is logged) Depending on proxy/no proxy/Rebol platform you always get some error or timeout without the directory listing ever being received. Thanks Nigel - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 25, 2000 11:40 PM Subject: [REBOL] Re: ftp limits? Hello [EMAIL PROTECTED], This might be completely unrelated, but I've noticed some other odd stuff. When reading directories with links, or the links themselves, sometimes strage things happen, example: *reading a dir* ## list: read ftp://ftp.aminet.net/pub/aminet/recent/ URL Parse: none none ftp.aminet.net none pub/aminet/recent/ none Net-log: [["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." --snip-- Net-log: [["LIST" "."] ["150" "125"]] Net-log: {150 Opening BINARY mode data connection for /bin/ls.} Net-log: [ none "226"] ** Access Error: Network timeout. ** Where: list: read ftp://ftp.aminet.net/pub/aminet/recent/
[REBOL] ftp limits? Re:(3)
Hi Nigel, I tried this and did get a timeout but I also got a timeout under Netscape reading the same site and received no directory listeing there either. That, unfortunately, tells me nothing other than the server is really slow. You mention that you always get "some error or timeout", so what error other than a timeout have you received? That may be of some use. Sterling Thanks for that. The directory that causes the problem is set drwxr-xr-x and all the files are -r--r--r--. So I don't think this is the same problem. This certainly looks like a bug in Rebol to me. The directory downloaded through an ftp client results in a 137k download (about 1500 files). I suspect the problem is caused by the number of files. I really do need an answer on this - if Rebol cannot do what I want I need save my efforts and look elsewhere. If anyone want to give it a try... system/schemes/default/timeout: 1000 print read ftp://anonymous:[EMAIL PROTECTED]/aix/fixes/cad/other/catia_o em_v4/IRIX/ Replace email_address with you correct email address (all activity is logged) Depending on proxy/no proxy/Rebol platform you always get some error or timeout without the directory listing ever being received. Thanks Nigel - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 25, 2000 11:40 PM Subject: [REBOL] Re: ftp limits? Hello [EMAIL PROTECTED], This might be completely unrelated, but I've noticed some other odd stuff. When reading directories with links, or the links themselves, sometimes strage things happen, example: *reading a dir* ## list: read ftp://ftp.aminet.net/pub/aminet/recent/ URL Parse: none none ftp.aminet.net none pub/aminet/recent/ none Net-log: [["PORT" port/locals/active-check] "200"] Net-log: "200 PORT command successful." --snip-- Net-log: [["LIST" "."] ["150" "125"]] Net-log: {150 Opening BINARY mode data connection for /bin/ls.} Net-log: [ none "226"] ** Access Error: Network timeout. ** Where: list: read ftp://ftp.aminet.net/pub/aminet/recent/
[REBOL] ftp limits? Re:(3)
Hi Nigel, Sterling There does appear to be some kind of problem with the REBOL ftp is this instance. I was able to get the dir listing with WS-FTP although the server was slow (took about 150 seconds). With REBOL I got (don't need the user e-mail if set-net has e-mail configured): system/schemes/default/timeout: 5000 == 5000 list-dir ftp://ftp.europe.ibm.com/aix/fixes/cad/other/catia_oem_v4/IRIX/ connecting to: ftp.europe.ibm.com ** User Error: Server error: tcp 421 Timeout (1800 seconds): closing control connection.. ** Where: list-dir ftp://ftp.europe.ibm.com/aix/fixes/cad/other/catia_oem_v4/IRIX/ I had no problem getting the dir lists for each of the parent directories using REBOL, so I am inclined to agree with your speculation that the number of files or the time required for the server to send them is part of the problem. Based on the tests with WS-FTP, the server should have sent back the dir-list in about 180 seconds, REBOL apparently was unable to receive or acknowledge this, leading to the server timeout at 1800 seconds. The results of using 'trace/net are shown below. I have CC'd this to feedback, perhaps Sterling or someone else at Rebol tech can diagnose the problem? (I see Sterling has already replied:-) I just tried WS-FTP a seond time. It took 120 seconds for the dir-list to start downloading. The dir-list was fine. Hope this helps Larry - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 01, 2000 12:53 AM Subject: [REBOL] ftp limits? Re:(2) Thanks for that. The directory that causes the problem is set drwxr-xr-x and all the files are -r--r--r--. So I don't think this is the same problem. This certainly looks like a bug in Rebol to me. The directory downloaded through an ftp client results in a 137k download (about 1500 files). I suspect the problem is caused by the number of files. I really do need an answer on this - if Rebol cannot do what I want I need save my efforts and look elsewhere. If anyone want to give it a try... system/schemes/default/timeout: 1000 print read ftp://anonymous:[EMAIL PROTECTED]/aix/fixes/cad/other/catia_o em_v4/IRIX/ Replace email_address with you correct email address (all activity is logged) Depending on proxy/no proxy/Rebol platform you always get some error or timeout without the directory listing ever being received. Thanks Nigel -snip TRACE/NET RESULT== system/schemes/default/timeout: 500 == 500 trace/net on list-dir ftp://ftp.europe.ibm.com/aix/fixes/cad/other/catia_oem_v4/IRIX/ URL Parse: none none ftp.europe.ibm.com none aix/fixes/cad/other/catia_oem_v4/IRIX/ none Net-log: ["Opening tcp for" FTP] connecting to: ftp.europe.ibm.com Net-log: [ none ["220" "230"]] Net-log: "220-" Net-log: "220- Welcome to ftp.europe.ibm.com" Net-log: "220- * " Net-log: "220-" Net-log: {220- You are connected to the FTP gateway for IBM Europe's} Net-log: {220- Electronic Customer Support Facility. This server is brought to you by } Net-log: "220- the IBM Global Services(UK) Web Server Team." Net-log: "220-" Net-log: {220- WARNING: Access and usage of this computer system is monitored.} Net-log: {220- Unauthorized access is prohibited and is subject to criminal } Net-log: "220- and civil penalties. " Net-log: "220-" Net-log: {220- Login using the "anonymous" userid. Please supply your email address} Net-log: {220- when prompted for a password. If you have any odd problems, try logging } Net-log: {220- in with a minus sign (-) as the first character of your password. This} Net-log: {220- will turn off a feature that may be confusing your client program.} Net-log: "220-" Net-log: {220- Please send any questions, comments, or problem reports about this} Net-log: "220- server to [EMAIL PROTECTED]" Net-log: "220-" Net-log: {220- ***} Net-log: "220-" Net-log: "220- Dear user," Net-log: "220-" Net-log: {220- The fixdist download at this site is temporarily unavailable.} Net-log: {220- Please reconfigure your fixdist client to point to one} Net-log: "220- of the following sites." Net-log: "220-" Net-log: {220- United Statesservice.software.ibm.com198.17.57.66} Net-log: {220- Canada rwww.aix.can.ibm.com204.138.188.126} Net-log: {220- Germany www.ibm.de 192.109.81.2} Net-log: {220- Nordic ftp.nordic.ibm.com 193.12.214.80} Net-log: "220-" Net-log: "220- We apologize for any inconvenience caused. " Net-log: "220- -administrator, Nov 12 1999" Net-log: "220-" Net-log: "220 ftp.europe.ibm.com FTP server ready." Net-log: [["USER" port
[REBOL] ftp limits? Re:(4)
Somebody will take a look at it. I did manage to get the same server response error which I think is generated if the server times out before REBOL does and closes the connection. REBOL expects to hear something back and does not so it fails to parse the empty response. Thanks for the info Larry, Nigel. Sterling Hi Nigel, Sterling There does appear to be some kind of problem with the REBOL ftp is this instance. I was able to get the dir listing with WS-FTP although the server was slow (took about 150 seconds). With REBOL I got (don't need the user e-mail if set-net has e-mail configured): system/schemes/default/timeout: 5000 == 5000 list-dir ftp://ftp.europe.ibm.com/aix/fixes/cad/other/catia_oem_v4/IRIX/ connecting to: ftp.europe.ibm.com ** User Error: Server error: tcp 421 Timeout (1800 seconds): closing control connection.. ** Where: list-dir ftp://ftp.europe.ibm.com/aix/fixes/cad/other/catia_oem_v4/IRIX/ I had no problem getting the dir lists for each of the parent directories using REBOL, so I am inclined to agree with your speculation that the number of files or the time required for the server to send them is part of the problem. Based on the tests with WS-FTP, the server should have sent back the dir-list in about 180 seconds, REBOL apparently was unable to receive or acknowledge this, leading to the server timeout at 1800 seconds. The results of using 'trace/net are shown below. I have CC'd this to feedback, perhaps Sterling or someone else at Rebol tech can diagnose the problem? (I see Sterling has already replied:-) I just tried WS-FTP a seond time. It took 120 seconds for the dir-list to start downloading. The dir-list was fine. Hope this helps Larry
[REBOL] FTP for large files
I am wondering if there are any limitations to transferring files using FTP from a rebol script. I am getting "** User Error: Server error: tcp 150 Preparing to transfer binary file" for files above 16MB (15MB work fine, but 16.4MB and above error immediately). I am using write/binary (to save) and read/binary (from the FTP server). I have tried from different FTP sites and I have verified that these files can indeed be downloaded using other FTP clients. I didn't notice any documented limitations of the FTP file size anywhere. Anyone else have his problem or know of a solution? Any help would be appreciated. Brian Lenain Software Developer East Ohio Machinery
[REBOL] FTP for large files Re:
Brian, I have managed to transfer files over 16MB, but the problem is write/binary %bigfile read/binary ftp://a.b.c/bigfile will read the file into memory before writing. It may be possible to use read/part and write/append to move the file in smaller chunks like bo's movefile.r on www.rebol.org. I would be interested to know if this approach works. btw I have been using 2.1.90.3.1 (ie win32) as 2.2.0.x seem to have problems with ftp to some servers, in my case aix (rebol bug ticket #1256) good luck, john
[REBOL] FTP for large files Re:(2)
Brian, In follow up to my own post, it looks like bo's script already does this, so have a look at www.rebol.org/file/movefile.r This may help. cheers john
[REBOL] FW: [REBOL] FTP for large files Re:(2)
John, Many thanks to you for taking the time to post your wisdom. I actually had a hard time trying to read Bo's code. I must have went over it 10+ times, but I finally have figured it out. Those comments in the function block really had me going insane until I realized they were just comments. I am still struggling to understand some things. Thanks again for your guidance. Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 29, 2000 8:43 AM To: [EMAIL PROTECTED] Subject: [REBOL] FTP for large files Re:(2) Brian, In follow up to my own post, it looks like bo's script already does this, so have a look at www.rebol.org/file/movefile.r This may help. cheers john