Re: passthru() passing variables

From: Date: Sat, 18 Jun 2005 21:06:21 +0000
Subject: Re: passthru() passing variables
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-217187@lists.php.net to get a copy of this message
On Fri, June 17, 2005 6:47 am, Jason Barnett said: > What is a reliable cross-platform way of showing which user PHP is > running as? http://php.net/get_current_user The bogus User Contributed note about REMOTE_USER is, well, bogus, almost for sure. If that fails, I guess you could try: <?php ob_start(); phpinfo(); $phpinfo = ob_endclean(); ?> Then you have to dig out the PHP User from that. It's possible there is a PHP Constant here that is the User: http://php.net/manual/en/language.constants.predefined.php If none of those work, I'm guessing even Windoze has something like "whoami" so you could http://php.net/exec "whoami" or its equivalent, based on the http://php.net/php_sapi_name If all that fails, I'd just give up. :-) -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#217187) next »