On Saturday 06 December 2003 12:56, Karam Chand wrote:

> 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

I believe you mean to say that it should output: 2Error

OK, does your "myapp" program dump its output to STDOUT?, Remember exec() only 
captures STDOUT.

> Both the php and the binary exsits in
> http://www.mydomain.com/mgmt/

One way to satisfy yourself that exec() is working is to create a small test 
program, eg:

----8<-------------
#!/bin/bash
echo "test"
----8<-------------

Then exec() it.

> Can I send you the binary so that you can check it
> out?

No thank you.

-- 
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 girl who stoops to conquer usually wears a low-cut dress.
*/

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

Reply via email to