The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

shell_exec

Discussion in 'General Discussion' started by JacobHaug, Mar 13, 2008.

  1. JacobHaug

    JacobHaug Member

    Joined:
    Mar 9, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Okay, I am running into a few problems when it comes to using the above command. No it is not being blocked in the php.ini file. The issue has to do with permissions. On my old server everything worked fine until I moved over to this new server.

    PHP:
    $who shell_exec("whoami");
    echo 
    "$who";
    When I run that commend on the old server I got that users username. Which, makes since as that means anything created via PHP would be owned by that user. In fact, every other host I know of was like that. But, on the new server when I run the commend it shows up as "nobody". How can I fix this so my commands will run properly for me and my users?
     
  2. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    If you are the server admin - recompile apache/PHP with suPHP if it's not already available in WHM->PHP Configuration->make sure suPHP is the controller
     
  3. JacobHaug

    JacobHaug Member

    Joined:
    Mar 9, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thanks so much! That worked! :D
     
Loading...

Share This Page