Re: User/Group
| From: | Jean-Christian Imbeault | Date: | Thu, 17 Apr 2003 02:53:21 +0000 |
| Subject: | Re: User/Group | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144220@lists.php.net to get a copy of this message | ||
Vincent M. wrote:
Hello, Is there any way to know from PHP global variables the USER and the group under which apache/php run ? For example, we wan know the server admin : $HTTP_SERVER_VARS["SERVER_ADMIN"]Don't know about global vars but you can get the UID and GID using the Unix calls:
id -un
id -gn
Put those commands in your PHP script and catch the result (look up shell_exec()).
Jean-Christian