RE: [PHP] exec/system question..

From: Date: Wed, 21 Jul 2004 19:25:35 +0000
Subject: RE: [PHP] exec/system question..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191388@lists.php.net to get a copy of this message
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 (#191388) next »