Re: php exec()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i try to use the system() function, i found the the last line of the
ifconfig is actually nothing.
but i still cannot execute the ipkg-cl program. any idea?
thank you.

regards,-keo

On Mon, Nov 3, 2008 at 11:31 AM, cheesiong <bluecolour.sz@xxxxxxxxx> wrote:

> hi all,
>  this is the first time i try out the mailing list. i hope to get help from
> here. thank you.
>
> i am facing a problem when i study exec() php function:
> i tried the example 1 on http://cn.php.net/manual/en/function.exec.php
> <?php
> // outputs the username that owns the running php/httpd process
> // (on a system with the "whoami" executable in the path)
> echo exec('whoami');
> ?>
>
> this is alright for me.
>
> when i added a line to the script
> <?php
> // outputs the username that owns the running php/httpd process
> // (on a system with the "whoami" executable in the path)
> echo exec('whoami');
> echo exec('/program/ipkg-0.99.163/bin/ipkg-cl --version');
> [echo exec('ifconfig');]
> ?>
>
> the output from the browser is the same and not the expecting version of
> the ipkg-cl.
> then i tried to echo exec('ifconfig'); the output is the same also.
>
> below is the output of server error log.
> root [ /srv/www/test ]# !tail
> tail /program/httpd-2.2.9/logs/error_log
>
> [Mon Nov 03 11:25:14 2008] [error] [client 10.104.9.220] ipkg version
> 0.99.163
>
> -------------------------
> ipkg-cl is executable. is chmod 777.
> root [ /srv/www/test ]# file /program/ipkg-0.99.163/bin/ipkg-cl
> /program/ipkg-0.99.163/bin/ipkg-cl: ELF 32-bit LSB executable, Intel 80386,
> version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared
> libs), not stripped
>
>
> i have tried to read more on the php net and have a few different trials. i
> do not have more idea now, i hope i can get someone help from here.
> thank you.
>
> regards,-keo
>
>
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux