FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » problems with exec()
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: problems with exec() [message #177704 is a reply to message #177701] Sun, 15 April 2012 17:43 Go to previous messageGo to previous message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma:
Senior Member
7segment wrote:
> Hi.
>
> I have an interesting problem and I cannot figure out what the problem
> might be.
>
> This does not produce any output:
>
> $response = exec('ifconfig');
> echo $response;
>
> Although when I try other commands, I get a response on the screen. So I
> don't get what's so special about ifconfig.
>
> Could anyone help please?

ifconfig usually residence in /sbin (some GNU/Linux distribution are in the
migration path of moving it to /usr/sbin), this directory is never in a
normal users or a daemon users $PATH, so you need to give the whole path to
this binary to be able to run it.

By default the file is executional by all users, but someone may have changed
permissions or setup ACL rules with for example SELinux.




--

//Aho
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: $this->delimiter in php explode
Next Topic: We Need Speakers For MOSC2012
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 11:55:07 GMT 2024

Total time taken to generate the page: 0.04146 seconds