Need help to create a new user to apache web server and assign root privileges to newly created user. Or how to login as root user in apache server because following php script showing you are logged in as
<?php echo `whoami`; ?>
closed as off topic by gentmatt, Mark, Ian C.♦, Kyle Cronin Mar 27 '12 at 17:18
Questions on Ask Different are expected to relate to Apple hardware or software within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.
There really isn't a good reason to run your web server as root. It opens you up to all kinds of potential abuse. OS X defaults to running the service as a severely under privileged user to protect you.
Don't make these changes unless you're absolutely certain you know what you're doing!
Open the file in a text editor and look for the following lines:
The plist that describes the Apache service to launchd is at
Once you've made the changes, restart Apache with:
and you should be running as root.
Again: BE CAREFUL DOING THIS!