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 Link to comment https://forums.phpfreaks.com/topic/111676-php-displaying-local-user-within-a-php-page/ 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... Link to comment https://forums.phpfreaks.com/topic/111676-php-displaying-local-user-within-a-php-page/#findComment-573234 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? Link to comment https://forums.phpfreaks.com/topic/111676-php-displaying-local-user-within-a-php-page/#findComment-573238 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. Link to comment https://forums.phpfreaks.com/topic/111676-php-displaying-local-user-within-a-php-page/#findComment-573269 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!!!! Link to comment https://forums.phpfreaks.com/topic/111676-php-displaying-local-user-within-a-php-page/#findComment-573279 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"); ?> Link to comment https://forums.phpfreaks.com/topic/111676-php-displaying-local-user-within-a-php-page/#findComment-573340 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! Link to comment https://forums.phpfreaks.com/topic/111676-php-displaying-local-user-within-a-php-page/#findComment-573946 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 Link to comment https://forums.phpfreaks.com/topic/111676-php-displaying-local-user-within-a-php-page/#findComment-573952 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.