correction below

chuck

----- Original Message -----
From: "Charles Williams" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Php-General (E-mail)"
<[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 10:54 PM
Subject: Re: [PHP] Capturing output of shell script.


>
> ----- Original Message -----
> From: "Brad Hubbard" <[EMAIL PROTECTED]>
> To: "Charles Williams" <[EMAIL PROTECTED]>;
> "Php-General (E-mail)" <[EMAIL PROTECTED]>
> Sent: Saturday, June 30, 2001 1:12 PM
> Subject: Re: [PHP] Capturing output of shell script.
>
>
> > On Sat, 30 Jun 2001 06:36, Charles Williams wrote:
> > > Hello all,
> > >
> > > I have an .sh shell script being executed from a php4 call.  I need to
> > > capture the string return and work with that in the php script.  The
> only
> > > problem is that the call works but I cannot get the returned string.
> I've
> > > tried using exec, passthru, ``, system, and escapeshellcommand.
Nothing
> > > seems to work.  any ideas?
> >
> > $capture = `script.sh 2>&1`; // redirect standard error to standard
output
> >
> >
> > Cheers,
> > Brad
>
> Brad,
>
> Here is what I am trying to execute:
>
>         $pass_string = "super cadduser -f \"".$full_name."\" -u
> \"".$Username."\" -p \"".$Password."\" -q \"".$Quota."\" -x -d
> ".$top_domain;

The above should be one line.


>         exec($pass_string, $ary_result);
>         echo "Result: ";
> #        var_dump($ary_result);
>         return $ary_result;
>
> For some reason it will only continue execution past the 'exec' call
rarely.
> Most of the time the script just stops after the exec call (the echo and
> below is not executed).  When it does go beyond the 'exec' call the
var_dump
> (that I use for testing only. will be gone when working) does show as an
> array.
>
> I have the max_execution_time set to 180 so I know the script isn't
timeing
> out.  Any ideas?  I have never run into this problem before.
>
> thanks
> chuck
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to