Re: Send process to background

From: Date: Fri, 13 Oct 2006 19:54:40 +0000
Subject: Re: Send process to background
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-243105@lists.php.net to get a copy of this message
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

« previous php.general (#243105) next »