How to get the logged-in user on the machine accessing the PHP page?

Asked

Viewed 129 times

2

I need to get the user who is logged in to the machine being used to access a certain PHP page. The PHP page is being served by an Apache. Through some researches, I found in the PHP documentation the following $_SERVER["REMOTE_USER"] and $_SERVER["PHP_AUTH_USER"] keys that at first would have the information I need, but these are not being returned by Apache. Is there any configuration in Apache or any way to have this information with PHP?

1 answer

0

  • Is setting up apache in a way that communicates with the domain enough to identify the user who accesses the site? This will require user authentication on access?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.