have you tried using the full path to the executable (eg /usr/bin/myapp
rather than ./myapp)?

Mike

On Sat, 2003-12-06 at 04:56, Karam Chand wrote:
> Hello
> 
> looking at manuals and help and some help from you. i
> wrote the attached code-
> 
>   error_reporting (E_ALL);
>   ini_set('display_errors', 1);
> 
>   $result = `./myapp`;
>   print_r ( $result );
> 
>   echo ( "2" );
> 
>   exec("./myapp",$result);
>   print_r($result);
> 
> It is returning output
> 
> 2Array ( ) 
> 
> which means the array is empty !!!
> 
> it should have outputted ErrorError
> 
> Both the php and the binary exsits in
> http://www.mydomain.com/mgmt/
> 
> Can I send you the binary so that you can check it
> out?
> 
> Karam
> 
> --- Jason Wong <[EMAIL PROTECTED]> wrote:
> > On Saturday 06 December 2003 02:44, Karam Chand
> > wrote:
> > 
> > > The output is
> > >
> > > StartEnd
> > 
> > Good, that shows your PHP program is being executed.
> > 
> > > I am sure that the linux binary is ok. coz if in
> > the
> > > sheel you just do
> > >
> > > ./myapp
> > >
> > > it outputs
> > >
> > > error
> > >
> > > seems that the binary is not getting executred. I
> > > think there is some permission info.
> > 
> > Not necessarily. Now it's time to check the manual
> > entry for exec() to see 
> > what *exactly* that function does. You'll find that
> > you're using it 
> > incorrectly (or it doesn't do what *you* think it
> > should do).
> > 
> > > if i do phpinfo() i get the following output for
> > safe
> > > stuff -
> > >
> > > safe_mode Off Off
> > 
> > Good, that rules out a lot of other possibilities as
> > to why your program isn't 
> > working.
> > 
> > -- 
> > Jason Wong -> Gremlins Associates ->
> > www.gremlins.biz
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet
> > Applications Development *
> > ------------------------------------------
> > Search the list archives before you post
> > http://marc.theaimsgroup.com/?l=php-general
> > ------------------------------------------
> > /*
> > The doctrine of human equality reposes on this: that
> > there is no man
> > really clever who has not found that he is stupid.
> >             -- Gilbert K. Chesterson
> > */
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/

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

Reply via email to