I'm just experimenting with LDAP... [ Windows 2000 Server/IIS/php 4.2.1]
I've uncommented the php_ldap.dll in my .ini... when I execute the following simple piece of code it gives me: Fatal error: Call to undefined function: ldap_connect() in E:\wwwshell\test\index.php on line 5 <? function checkUser ($username,$password) { $ldapserver = 'ip_for_ad_svr'; $ds=ldap_connect($ldapserver); if ($ds) { $dn="cn=$username,cn=Users, DC=[sitename], DC=[sitesuffix]"; $r=@ldap_bind($ds,$dn,$password); if ($r) { return true; } else { return false; } } } if(checkNTUser("brian","moo")) { echo "USR Auth!"; } else { echo "USR NOT Auth!"; } ?> What have I not done? [ http://www.the-local-guide.com :: http://www.mcgarvie.net ] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php