Is there a way to figure out which user it is that executes a php-script in a webserver using php-commands? (I don't have shell access to the server running httpd, so I cant use ps.)

link|improve this question

57% accept rate
feedback

1 Answer

up vote 3 down vote accepted

Use the function posix_getuid.

link|improve this answer
1  
Thanks. That was the key-idea. In the end I used print_r(posix_getpwuid(posix_getuid())); – aioobe May 19 '10 at 10:02
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.