Re: Php and forking

From: Date: Wed, 31 Jan 2001 18:54:25 +0000
Subject: Re: Php and forking
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37520@lists.php.net to get a copy of this message
This isnt exactly what your looking for, Im sure of it, but it works for me in the past. If you have a page that does something like email 1000 shareholders about a new press release, this takes some time. You dont need to sit here for 30min to wait for the page to finnish. <? //-email.php- exec("php -q email_press.php &"); ?> <? //-email_press.php- for($c = 0; $c < 1000; $c++) { mail(...); } ?> send your web client to email.php and that will call email_press.php wich is now running in the backgound. not at all like forking a process, but it works. -- Chris Lee Mediawaveonline.com lee@mediawaveonline.com "Nicklas af Ekenstam" <n@nille.org> wrote in message news:5.0.2.1.0.20010131144730.03378848@mail.toga.se... > Hi! > > Is there some way (perhaps using a multi threaded httpd?) that I can get > php to fork processes? > I.e. I'd like to have a script which prints something to the clients web > browser and terminates that http connection, but keeps going in the > background doing other processing not related to the client and, if > necessary, pipes that output to /dev/null. > > - Nille > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#37520) next »