I wanted to determine the user name under which PHP was running for a WordPress blog on a hosting site. To do so, I placed a PHP script,
whoami_here.php, in the home folder for the WordPress installation and then accessed the webpage for that script via a browser, e.g.
There are a variety of methods you can use to check on which account
PHP is running under, e.g.,
<?php passthru("whoami"); ?>,
though some methods may not work on some systems.
[ More Info ]