You could start by running the PHP script via cron. If the timeout you got was from the web server's configuration then it might not timeout when run from cron.

To run a PHP script from cron you first give the path to php then the path to the script, so depending on your server setup, it would look *something* like this

/usr/local/bin/php /full_path_to_ftp_script/the_script.php

If it still times out you could try wrapping the call to the php script in a shell script. The shell script would need to generate or read a list of the files to be ftp'd and pass them to the php script. The php script would need to read the input, handle just one file and then exit.

Hope the makes sense,
Sheila



steve miller wrote:
yes, I can cron!


On Mar 7, 2007, at 10:03 AM, Sheila Fenelon wrote:

steve miller wrote:

Hi all.
Probably a simple question for *nix people, but not for a newbie :)
I want to ftp the contents of a large directory from one server to
another (probably 300 files @ 20MB each).
I have the login and paths for both the sending server and the
receiving, but I don't have telnet access into them.
I have written php scripts to ftp them, but the scripts timeout after
about 10 files.
I've tried simply using an ftp client with 2 windows open, but that
is way slow.
Is there a way to issue an exec ftp command to do this that won't
timeout the php script?
Maybe run some shell program or something?
Any help appreciated!
steve


Without shell access your options are limited. Can you run cron scripts on machine with the files?

--
Sheila
http://www.shefen.com/




____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to