Hello,
On 07/08/2002 04:48 PM, Bill Rucker wrote:
> I have written an intranet application that needs to be used by different
> types of users. However, I want to prevent some users from changing the data
> in the database. The server providing this application is running PHP 4.2 on
> IIS5. I would like to capture the error message cleanly and present a "You
> are not authorized to view this page" message based on Windows NT user ID or
> group membership. I use ADSI for other tasks and it is an obvious choice
> here as well. I just can't seem to get it to work properly.
>
> Here is a sample of what I am trying just to prove it can work:
> <?php
> $objDomain = new COM("WinNT://DomainName") or die("Cannot get DomainName
> object");
> $objDomain->filter = array("group");
> foreach($objDomain as $group){
> print $group->name."<br>\n";
> }
> print "\nDomainName Group enum complete<br>\n";
> ?>
>
> The output of this script is just the final print statement. It appears to
> get the object fine.
>
> Any help would be appreciated.
I don't know if you are aware of it, but there is a book on PHP
programming for Windows that has a whole chapter on Active Directory. It
also shows how to make queries with PHP LDAP functions besides using COM
objects.
You may want to take a look at a review of the book here:
http://www.phpclasses.org/products.html/id/0735711690.html
--
Regards,
Manuel Lemos
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php