Help - Search - Members - Calendar
Full Version: shell_exec
The Planet Forums > System Administration > Other
Jacob Haug
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";[/PHP]

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?
James Jhurani
are you using php-suexec on the other box, and not on this one?
Jacob Haug
Yep, that was the problem! I just recompiled apache and it worked!
James Jhurani
QUOTE (Jacob Haug @ May 20 2008, 02:25 PM) *
Yep, that was the problem! I just recompiled apache and it worked!


Glad to see you got it fixed!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.