Re: running an exec in the background, let page go on.
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: running an exec in the background, let page go on.

From: Andy Jeffries <news@andyjeffries.co.uk>
Date: Fri Apr 28 2006 - 10:07:13 CEST

On Thu, 27 Apr 2006 09:33:08 -0700, Sjoerd wrote:
>> exec("/var/www/html/services/ftp.sh $zipfile 2>&1 &", $output2,
>> $status);
> Why doesn't this work?

Because the stdout handle will still point to the handle the Apache/PHP
module is listening/blocking for input on.

I posted more about this in my recent thread:

Executing PHP Tasks While Letting A User Continue To Browse?
http://nextgen.url123.com/backgroundphp
(Google groups link for those of you that can't find it in your newsreader)

Cheers,

Andy

-- 
Andy Jeffries MBCS CITP ZCE   | gPHPEdit Lead Developer
http://www.gphpedit.org       | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Received on Mon May 1 03:06:32 2006