# LDAP bind option

- Thread: https://externals.io/message/1743
- Original archive: https://news-web.php.net/php.internals/1743
- Started by Nathaniel David Gallaher on 2003-05-19T22:26:43+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1743 — Nathaniel David Gallaher — 2003-05-19T22:26:43+00:00

URL: https://externals.io/message/1743#1743

Currently the call to ldap_bind only supports the method LDAP_AUTH_SIMPLE
(as it is hardcoded in the php function definition).  Can we put the
method parameter (as see in the call to ldap_bind_s) back into the PHP
function?  I have an application that obtains x509 certs (securely) and I
want to use them to bind to the LDAP server.

~Nathan

---

## #2148 — Jon Parise — 2003-06-04T06:59:41+00:00

URL: https://externals.io/message/1743#2148 · In reply to: #1743

> Currently the call to ldap_bind only supports the method LDAP_AUTH_SIMPLE
> (as it is hardcoded in the php function definition).  Can we put the
> method parameter (as see in the call to ldap_bind_s) back into the PHP
> function?  I have an application that obtains x509 certs (securely) and I
> want to use them to bind to the LDAP server.
 
I'll try and have a look at this soon.  I just need to find the time
to get my local LDAP server up and running again for testing. 

-- 
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

---

## #2149 — Stig Venaas — 2003-06-04T07:10:15+00:00

URL: https://externals.io/message/1743#2149 · In reply to: #2148

> 
> 
> > […]
>  
> I'll try and have a look at this soon.  I just need to find the time
> to get my local LDAP server up and running again for testing. 

There are also things like SASL that should be supported. That should
perhaps be done with a separate bind function though.

It's great if you look into this, I have sort of had it on my todo list
for a couple of years...

Stig

---

## #2150 — Jon Parise — 2003-06-04T07:13:10+00:00

URL: https://externals.io/message/1743#2150 · In reply to: #2149

> > […]
> 
> There are also things like SASL that should be supported. That should
> perhaps be done with a separate bind function though.

Yes, I noticed.  It looks like the Microsoft implementation has its
own set, as well:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/ldap/ldap_bind_s.asp

For now, I'll work from the OpenLDAP implementation.  That will
probably benefit the largest percentage of PHP users.
 
> It's great if you look into this, I have sort of had it on my todo list
> for a couple of years...

Hopefully it won't remain on mine for that long. =)

-- 
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

---

## #2170 — Nathan Gallaher — 2003-06-04T14:59:49+00:00

URL: https://externals.io/message/1743#2170 · In reply to: #2149

> 
> > […]
>
> There are also things like SASL that should be supported. That should
> perhaps be done with a separate bind function though.
>
> It's great if you look into this, I have sort of had it on my todo list
> for a couple of years...
>
> Stig
>
I worked on this for a couple of weeks and got a function written (just
extracted the ldap_sasl_bind_s() and supporting bits from the ldapsearch
program supplied with openldap) but I had one heck of a time getting all
the neccessary libraries to work together. (I was using the GSI_GSSAPI
mechanism which requires its own set of libs that are a little "special"
and conflict with the normal libs)

If anyone finds an easy soln, let me know.
~Nathan
