note 57623 added to function.get-current-user

From: Date: Sun, 09 Oct 2005 06:25:57 +0000
Subject: note 57623 added to function.get-current-user
Groups: php.notes 
Request: Send a blank email to php-notes+get-96709@lists.php.net to get a copy of this message
with 4.3.11 (and i assume all other versions): get_current_user() does *not* get the name of the user the script is running as, as stated in the comment below. instead, it "gets the name of the owner of the current PHP script" (as stated in the description above) --- that is, the owner of the file, not the owner of the process. if the script file is owned by root but php scripts are being being run as apache (for example, you're using mod_php because you don't mind your shared hosting environment being insecure), when you request your script through the webserver, get_current_user() will return "root". that does not mean your script is running as root. ---- Manual Page -- http://www.php.net/manual/en/function.get-current-user.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57623 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57623&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57623&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57623&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57623&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57623&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57623&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57623&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57623&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#96709) next »