Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.)

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Use the function posix_getuid.

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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