php, iis and authenticion

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
jeppe
Forum Newbie
Posts: 6
Joined: Sat Mar 29, 2003 3:05 pm

php, iis and authenticion

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

in what way do you control .htaccess via php in your script?
jeppe
Forum Newbie
Posts: 6
Joined: Sat Mar 29, 2003 3:05 pm

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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)
jeppe
Forum Newbie
Posts: 6
Joined: Sat Mar 29, 2003 3:05 pm

Post 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 :wink: - 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 :roll:
DocSeuss
Forum Newbie
Posts: 10
Joined: Sat Mar 29, 2003 3:28 am

Post by DocSeuss »

http://support.microsoft.com/?kbid=324064

that is the most info I could find on the subject.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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
jeppe
Forum Newbie
Posts: 6
Joined: Sat Mar 29, 2003 3:05 pm

Post 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.
Post Reply