RE: [PHP] exec/system question..

From: Date: Wed, 21 Jul 2004 19:44:22 +0000
Subject: RE: [PHP] exec/system question..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191389@lists.php.net to get a copy of this message
michael... something strange is happening/or i'm missing something basic... but here's the sys response from your suggestion... [root@lserver2 test]# php -r 'exec("bash -c 'exec nohup perl /home/test/college.pl >/dev/null 2>&1 &'");' [3] 2566 -bash: ");: command not found -bruce -----Original Message----- From: Michael Sims [mailto:michaels@crye-leike.com] Sent: Wednesday, July 21, 2004 12:26 PM To: bedouglas@earthlink.net; php-general@lists.php.net Subject: RE: [PHP] exec/system question.. bruce wrote: > my attempt (below) never seemed to work properly... > > php -r 'exec("perl /home/test/college.pl /dev/null 2>&1 &");' > <<< > works, but doesn't return until the perl app completes... > > > php -r 'exec("bash -c 'exec nohup perl /home/test/college.pl > /dev/null 2>&1 &'");' <<< can't get this to > work/return.... In what you've got above you are passing "/dev/null" as an argument to perl script instead of redirecting to it, since you're missing the ">"...so change it to: php -r 'exec("bash -c 'exec nohup perl /home/test/college.pl >/dev/null 2>&1 &'");'

« previous php.general (#191389) next »