Forum Moderators: phranque

Message Too Old, No Replies

shell exec

         

JacobHaug

10:51 am on Mar 13, 2008 (gmt 0)

10+ Year Member



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.

$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?

coopster

6:40 pm on Mar 13, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, JacobHaug.

That probably is correct. Many Apache servers are setup to run as user "nobody" and PHP adopts that permission when Installed as an Apache module [php.net].