sunilvadranapu Posted July 22, 2008 Share Posted July 22, 2008 Hi, how can i generate windows login dialog when ever users access my PHP application. I am running PHP on Apache. what configurations i need to do on apache side and php side. On IIS, we can enable "Integrated Windows authentication". how can i do this on apache and PHP? please guide me in this regard. thanks in advance. -sunil Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/ Share on other sites More sharing options...
budimir Posted July 22, 2008 Share Posted July 22, 2008 You're posting your question on a wrong forum. You have a section for this. I assume that you are asking how to protect access to the phpmyadmin, or something like that For phpmyadmin, you need to access config.inc.php and change line number 71 to $cfg['Servers'][$i]['auth_type'] = 'http'; So when you try to access phpmyadmin it will pop up a window and ask you for the username and password. Correct me if I have missunterstood? Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-596278 Share on other sites More sharing options...
sunilvadranapu Posted July 22, 2008 Author Share Posted July 22, 2008 Hi, thanks for your reply. my question is: In IIS security tab, we can set "Integrated windows authentication" for our webapp, then login window will ask for windows username and password. i want the same functionality in apache/PHP. how to configure apache to enable windows login dialog box when user access my PHP webapp?? Thanks, Sunil Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-596309 Share on other sites More sharing options...
budimir Posted July 22, 2008 Share Posted July 22, 2008 I don't think that is possible in Apache! Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-596505 Share on other sites More sharing options...
craygo Posted July 22, 2008 Share Posted July 22, 2008 if you want to secure a section of a web app you are better off having an html login page and holding login information in a mysql database. otherwise you would have to have a login script on every page. Ray Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-596509 Share on other sites More sharing options...
sunilvadranapu Posted July 23, 2008 Author Share Posted July 23, 2008 thanks for your replies. I can put a login page but the thing is all of us already having network/windows logins here and instead of giving them another login and pwd, i am thinking it is better to ask them to enter same windows loign/pwd. if i am able to enable the windows login dialog, then they can login with their windows loign/pwd and i can keep them in sessions and can proceed with that. any alternative for this?? Thanks, Sunil Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-597331 Share on other sites More sharing options...
ignace Posted July 23, 2008 Share Posted July 23, 2008 what iis basically does is changing the header when you access a certain folder, in apache you don't have such tabs, but you can mimic it by setting the same header in your php script, here's an example: http://be2.php.net/features.http-auth Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-597341 Share on other sites More sharing options...
craygo Posted July 23, 2008 Share Posted July 23, 2008 Try this here http://sourceforge.net/projects/mod-auth-sspi Ray Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-597497 Share on other sites More sharing options...
sunilvadranapu Posted July 24, 2008 Author Share Posted July 24, 2008 thanks for the information you are providing. the code i downloaded from sourceforge is for apache on windows.I want similar modules for apache on linux. thanks in advace. -sunil Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-598280 Share on other sites More sharing options...
sunilvadranapu Posted July 24, 2008 Author Share Posted July 24, 2008 my problem is : We have a Windows file server with some shared folders. We have a web server running Apache on Suse. We want to give access to the shared folders via PHP running on apache(the web server) only to the valid Windows users. We can not use the normal authenication techniques commonly used in Apache like basic, authentication, dbm, or LDAP. I wanted to know if there is any way to authenticate users against a Windows domain on Apache running in Linux? I couln't find any useful information on Google. Can anyone point me the appropriate resources? thanks, Sunil Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-598345 Share on other sites More sharing options...
craygo Posted July 24, 2008 Share Posted July 24, 2008 Well to be honest, even if you did it wouldn't help. Working with remote files is not one of php's strong points or any web based language for that matter. You won't be able to browse shared directories on the windows box from the linux box. Only way to do something like that would be to setup an FTP server on the windows server and have linux connect to it through some login script. Even then transferring the files would be a nightmare. You would have to transfer the file to the linux box through ftp then download the file from the linux box. Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-598521 Share on other sites More sharing options...
sunilvadranapu Posted July 25, 2008 Author Share Posted July 25, 2008 Hi all, I got one solution for this using NTLM module with Apache. I have downloaded and installed NTLM from sourceforce (http://sourceforge.net/project/showfiles.php?group_id=4906&package_id=75281). Find the configuration procedure at http://www.section6.net/wiki/index.php/Setting_up_Apache_2.2.x_for_NTLM_Authentication_using_Mod_NTLM2 Now i am able to read the windows login username with PHPs $_SERVER['REMOTE_USER']. Thanks for all your help and time. please let me know if there any other solution for this. Thanks, Sunil Quote Link to comment https://forums.phpfreaks.com/topic/115974-how-to-enable-windows-login-dialog-in-phpapache/#findComment-599373 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.