Joshua Beall wrote:[color=blue]
> Hi All,
>
> I am working on a mailing list program for a client, and I am wondering
> what tbe hest way to deal with script timeouts is. I realize that I
> could use set_time_limit() to increase the script timeout, but that
> doesn't handle situations where 1) safe mode is on, or 2) Apache's
> timeout is exceeded. These mailings go out to between 5000 and 10000
> email addresses, so timeouts are a concern.
>
> It seems to me that the best thing to do would be to fire off a separate
> process, perhaps a PHP script that runs directly via the php executable
> (a command line script, rather than a .php file that is executed through
> Apache).
>
> Is there a way to trigger a process that will then run on its own? The
> PHP script running in the browser could then send a message saying
> "delivery started" or something, and the separate PHP script that has
> been fired would handle the actually delivery. It would run outside of
> Apache, and can record success/failure in a database.
>
> Running PHP4.3.9 on RHEL (but I would like a solution that is not tied
> to a particular version of PHP or Linux, if possible).
>
> Thoughts?
>
> Sincerely,
> -Josh[/color]
Possibly a cron job running a PHP script that writes and subsequently
reads its own a log file ... containing the settings for the next SQL
query's start row and limit.
http://www.phpfreaks.com/tutorials/28/0.php