Kind of makes sense.
I have run scripts from crons before, so that part I know how to do.
The timeout issue was the problem, and it might be the server config; I'm not sure.

What I was thinking was that I could run an exec within php that executes the ftp statement like on a command line, but I don't know the correct syntax.

Something like:

exec (" ftp ftp://user:[EMAIL PROTECTED]/path path/to/files/*.* ")

Would this work?



On Mar 7, 2007, at 11:30 AM, Sheila Fenelon wrote:

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





____ • 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