Re: Send process to background

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's what I'm trying to do.

There is a script that is called through a web request. That same
script is responsible for backing up a whole site (and database) to
.tar.gz files.

Evidently, this will take a while. My first requirement was that it
should _NOT_ deppend on external libraries (ie. pecl, modules and
such). It has to be self-sustained. As such, it will take a bit longer
to execute.

All I need is a way to send a function to background, and to finish
the request telling the user that the backup is being made. At that
time, it should continue executing the backup untill it has been
completed. If I can manage to do this, I will be able to make an
application that pools the same page (it will store a status) to know
if it's doing anything, if it has finished, if an error ocurred, or if
the backup can be downloaded to our fileservers.

Thanks.

On 10/13/06, Paul Scott <pscott@xxxxxxxxx> wrote:

On Fri, 2006-10-13 at 16:05 +0000, André Medeiros wrote:

> The thing is, the first request to the site needs to start the backup,
> but I didn't want to use any command-line tools, since some of our
> servers rely on safe_mode. Is there any way to send output to the
> browser on this first instance, finish the request, but keeping the
> PHP running and making the backup.

Take a look at this class that I wrote a while back. It does what you
need.

http://www.phpclasses.org/browse/package/2837.html

--Paul



All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux