Re: [PHP] Weird behavior of exec()

2010-07-16 Thread Leonardo
Em 16/07/2010 12:18, Jim Lucas escreveu: I tried running the same script, and found that the php binary is not in my path. run this echo passthru('which php'); Also, modify your existing exec() command to the following and it will capture errors too. exec('php b.php> output.txt 2>&1&'); A

Re: [PHP] Weird behavior of exec()

2010-07-16 Thread Leonardo
Em 16/07/2010 09:09, Richard Quadling escreveu: I'm on Windows XP SP3 and using PHP 5.3.3RC3 (cli) (built: Jul 15 2010 02:00:11) Copyright (c) 1997-2010 The PHP Group All seems to work as expected. Z:\\output.txt'); echo ' File A (2) '; ?> And because of my setup matching the docs at [1]

Re: [PHP] Weird behavior of exec()

2010-07-16 Thread Jim Lucas
Leonardo wrote: > Hi everybody. I need to use exec() to run a background php script, but > it's not working properly. Take a look at this sample: > > a.php > >echo ' File A (1) '; > >exec('php b.php > output.txt &'); > >echo ' File A (2) '; > >?> > > b.php > >echo

Re: [PHP] Weird behavior of exec()

2010-07-16 Thread Richard Quadling
On 15 July 2010 16:51, Leonardo wrote: > Hi everybody. I need to use exec() to run a background php script, but it's > not working properly. Take a look at this sample: > > a.php >   >   echo ' File A (1) '; > >   exec('php b.php > output.txt &'); > >   echo ' File A (2) '; > >   ?> > > b.php >