michael...

something strange is happening/or i'm missing something basic... but here's
the sys response from your suggestion...

[EMAIL PROTECTED] 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:[EMAIL PROTECTED]
Sent: Wednesday, July 21, 2004 12:26 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
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
&'");'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to