2

I am stuck with LDAP authentication using in PHP...googled lot of forums, read lot of articles, without success. May somebody knows the solution..

So, first, I have a working solution thru apache htaccess as a start

AuthName "Restricted area"
AuthType Basic
AuthBasicProvider ldap
AuthLDAPURL "ldap://servername.ac.uk:389/ou=ooooo,dc=myusers,dc=mmm,dc=nnn,dc=ooo?cn?sub?(objectClass=person)"
AuthLDAPBindDN "cn=tttt,ou=Users,dc=myusers,dc=mmm,dc=nnn,dc=ooo"
AuthLDAPBindPassword "xxxxxxx"

# Must be in one of these groups to access the web pages:
require ldap-group CN=staff1,OU=Group1,DC= myusers,DC= mmm,DC= nnn,DC= ooo
require ldap-group CN=staff2,OU=Group2,DC= myusers,DC= mmm,DC= nnn,DC= ooo

that htaccess succcesfuly checks an user belongs to a group and authenticates him.

However, I would like to convert it to PHP but don't have much knowledge about LDAP so don't know how to convert it into php code?

Thanks in advance.

  • 1
    http://stackoverflow.com/questions/5449356/php-authenticating-with-ldap?rq=1 may be this one help u.. – Bijay Rai Jan 14 '14 at 06:31

0 Answers0