Re: exec() and redirect output of program

From: Date: Tue, 01 May 2007 17:12:55 +0000
Subject: Re: exec() and redirect output of program
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-254195@lists.php.net to get a copy of this message
This way just lets it do it's own thing, with no output, and PHP won't hang. It'll continue from the CLI after the HTTP session is over. <? exec('php test.php > /dev/null 2>&1 &'); ?> On 5/1/07, Brad Fuller <bfuller@cpacampaigns.com> wrote:
I found this on PHP.net: http://us.php.net/manual/en/function.exec.php Note: If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends. This is what I want... I want to execute another PHP script from the CLI, pass it a parameter and let it go to town after the HTTP request closes. Can someone please illustrate how I can make this work? Thx, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107

« previous php.general (#254195) next »