Re: Send process to background

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

 



Richard Lynch wrote:
On Fri, October 13, 2006 11:05 am, André Medeiros wrote:
I am working on a backup system that needs to be called through a
webpage to start the process. I am trying to do this on a
one-file-only sollution.

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.

Probably not, at least not in a portable way.

In *some* OS configurations this might work:

<?php `backup_script_here.xyz &`;?>

No promises.

A hack I've used was to make a standalone script, then call it via curl (http://localhost/path/to/script.php) with a timeout set to something short. Output can be sent to a file or database somewhere that can be read back and deleted later. That isn't pretty though...

jon

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