Page 1 of 1
php, iis and authenticion
Posted: Sat Mar 29, 2003 3:05 pm
by jeppe
I have written a content management system in php and I have been using apaches authenticationsystem - with .htacces - an extremely simple and useful system. Now I have to think something out for those people that for some strange reasons use Microsoft IIS. After hours of searching around in Microsofts "knowledge" (sic!) database, I have given up and turn to you:
Does any of you smart people know if there is a way similar to using .htaccess in IIS - that is a way to control user access directly from the php-scripts.
I am very grateful in advance for your responses!
Jeppe Bundsgaard
Posted: Sat Mar 29, 2003 3:11 pm
by volka
in what way do you control .htaccess via php in your script?
Posted: Sat Mar 29, 2003 3:18 pm
by jeppe
in what way do you control .htaccess via php in your script?
I use fwrite(".htaccess", $htaccesstext) in every dir I want to protect.
Posted: Sat Mar 29, 2003 3:21 pm
by volka
I've never done this, so it might be completely the wrong approach, but
IIS provides some (guess what

) COM-Interfaces to its configuration
metadatabase. The
base object interface might be useable via php-win32-com.
http://msdn.microsoft.com/library/en-us ... ingIIS.asp
http://msdn.microsoft.com/library/en-us ... ectABO.asp
Good luck
(and don't blame me if there is a simpler way ...I hope so)
Posted: Sat Mar 29, 2003 4:01 pm
by jeppe
Thank you, volka, for your quick answer.
Please excuse my stupid question: Is the metabase the place where users and permissions are stored?
And is the metabase a base for all activity at a given server - even a server hosting several sites?
Then I guess only a few brave webhosts will let my script access and modify the metabase - the problem is, as you have guessed - that I am not myself the lucky owner of the webserver, the script shall be running on - so I don't have the full command over the server.
Once again - sorry

- is the metabase the - only - place to control access and to set up new users (I do that simply by adding them to a text file when running on apache)? Then I guess people having their sites on an IIS-server will have to do without my CMS

Posted: Sat Mar 29, 2003 4:27 pm
by DocSeuss
http://support.microsoft.com/?kbid=324064
that is the most info I could find on the subject.
Posted: Sat Mar 29, 2003 4:33 pm
by volka
I have to admit my knowledge on configuring IIS is too limited to answer that.
My guess (and it's only a guess) is that permissons to change certain aspects of the configuration can be defined on a similar fine level as for apache.
If nobody here can help you there are mailing lists and newsgroups at microsoft were people are willing to help, I've made good experience with that.
http://communities2.microsoft.com/home/ ... d=34000003
http://msdn.microsoft.com/library/share ... ng411_.xml
Posted: Sat Mar 29, 2003 7:39 pm
by jeppe
To DocSeuss: The page you refer to is written to people that can acces the server directly - not via the web.
Thank you for your help, anyway - and to volka too. I'll try microsofts communities.