Re: Send process to background

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

 




On Oct 13, 2006, at 12:12 PM, 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.

In unix, you can run something like this:

    script >& output.log &

You can call something like that using PHP system calls.

You might be stuck if safe_mode_exec_dir is locked down. You're especially screwed when you remove the option of using command-line tools.

If you were to try to use PHP itself to manually get a directory listing, open each file, compress it, add it to an archive, etc., you're definitely going the wrong route.

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