http://qs321.pair.com?node_id=79826


in reply to Problems with ftp scripts

Since the problem involves a server timeout which you have problems getting around, I suggest that you use system calls. Under normal circumstances, of course, this is hardly "good", but since you really need the power of fork under windows (if I understand correctly), then your best bet would be to interface with a shell-based FTP client. This might involve writing to a temporary file to upload, but it circumvents the timeout on the scripts (perhaps a config option for this?) and will get the job done with minimum hassle. The script looks good and, as you say, it works fine until a timeout, so you've probably nailed the problem alot of other people have had in FTP via web. Good luck!
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Replies are listed 'Best First'.
Re: Re: Problems with ftp scripts
by LiTinOveWeedle (Scribe) on May 12, 2001 at 11:46 UTC
    THX AgentM,
    I think so, that problem is in forking into separate proces. And you'r right I running script under winnt4 an win9x platform. I use same technique which merlyn describe in his Web Techniques Column 20. But no succes.

    Anybody had same problem with forking under win32?
    Whole problem is that my webserver probably terminate both child and parent processes, so ftp transfer is interupted before it can end.

    Any suggestions? I will be glad if there can be other way than using ext. ftp program.
    I will try to separate script into two independent scripts and start ftp script by system call. This should work but this isn't purist solution.

    Li Tin O've Weedle
    mad Tsort's philosopher