LDAP...

From: Date: Tue, 18 Jun 2002 08:45:35 +0000
Subject: LDAP...
Groups: php.general php.windows 
Request: Send a blank email to php-general+get-102662@lists.php.net to get a copy of this message
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 ]

« previous php.general (#102662) next »