note 57623 deleted from function.get-current-user by danbrown

From: Date: Sat, 19 Jul 2008 23:57:32 +0000
Subject: note 57623 deleted from function.get-current-user by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141811@lists.php.net to get a copy of this message
Note Submitter: justin samuel ---- 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.

« previous php.notes (#141811) next »