[Phpwm] PHP and LDAP

Tony Whitmore phpwm at tonywhitmore.co.uk
Wed Sep 6 22:13:34 BST 2006


I'm looking at making a PHP web application authenticate against an LDAP
tree. I'll be developing with a Free Software test LDAP server, probably
OpenLDAP because it's the only one I've heard of.

I've looked a bit at the documentation for the ldap_* functions and the
examples in the comments that follow, but I'm not 100% clear on what
fields I need to query the LDAP server for - surely the passwords aren't
stored / transmitted in plain text? Here's what I want to happen:

1) User enters their username/password in a login page.
2) Their details are checked against the LDAP directory.
3) If the username/password is invalid, they are rejected.
4) If the username/password are authenticated, then some session
variables are set up and we're good to go.

Relatively simple, I think. But can anyone recommend some good HOWTOs or
similar on getting up and running with PHP and LDAP?

TIA,

Tony



More information about the Phpwm mailing list