z20let Posted June 24, 2008 Share Posted June 24, 2008 Hey, All me and my IT Officer are looking to do at the moment is display the "current user" (windows user name) We are using Apache 2.2 and unfortunately for us, most of the help and advice online is for IIS Any help would be greatly appreciated thanks Quote Link to comment Share on other sites More sharing options...
webent Posted June 24, 2008 Share Posted June 24, 2008 I could be wrong here, but as far as I know you can't access that kind of information purely with php... you'd have to use something more like an ActiveX control or something... Quote Link to comment Share on other sites More sharing options...
z20let Posted June 24, 2008 Author Share Posted June 24, 2008 It seems very difficult to find any examples on the web about this... What ever variable we use it doesn't seem to like it? But you say we have to use ActiveX? explain? Quote Link to comment Share on other sites More sharing options...
dmccabe Posted June 24, 2008 Share Posted June 24, 2008 I think it entirely depends on what server your running and what info that server has access to. I was trying to do this before and found it was impossible to grab that info from the client. By echo'ing out phpinfo() you can see what info is available for you to grab. Quote Link to comment Share on other sites More sharing options...
z20let Posted June 24, 2008 Author Share Posted June 24, 2008 I think it entirely depends on what server your running and what info that server has access to. I was trying to do this before and found it was impossible to grab that info from the client. By echo'ing out phpinfo() you can see what info is available for you to grab. We are just testing it locally at the moment, we have downloaded a module for apache (2.2) "mod_auth_sspi" however now that we have it the IT Officer has noticed that there are lots of other files which have been downloaded with it that may not have anything to do with the actual module file itself!?!? God damn Apache!!!! Quote Link to comment Share on other sites More sharing options...
nashruddin Posted June 24, 2008 Share Posted June 24, 2008 Print current user (windows): <?php echo getenv("USERNAME"); ?> Quote Link to comment Share on other sites More sharing options...
z20let Posted June 25, 2008 Author Share Posted June 25, 2008 Print current user (windows): <?php echo getenv("USERNAME"); ?> We are just going to try this now... I will let you know the result! Quote Link to comment Share on other sites More sharing options...
z20let Posted June 25, 2008 Author Share Posted June 25, 2008 Print current user (windows): <?php echo getenv("USERNAME"); ?> We are just going to try this now... I will let you know the result! No luck unfortunately, it doesn't seem to do anything??? Remember we are running Apache 2.2 with MySQL 5 and PHP 5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.