NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP/LDAP

Tim Sailer sailer at bnl.gov
Wed Aug 28 14:09:41 EDT 2002


On Wed, Aug 28, 2002 at 02:10:17PM -0400, Hans Zaunere wrote:
> 
> --- Tim Sailer <sailer at bnl.gov> wrote: 
> > I need some guidance from the LDAP gurus, I think.  I've long been
> > able to get PHP to read from LDAP, but now I have the need to write,
> > and I'm running up against a strange problem.
> 
> I've been lucky enough to only have to read from LDAP myself, but I did
> run into the fact that the LDAP functions can be picky about what is
> pased to them; ie, references, arrays, etc.  The code certainly looks
> reasonable, however, I noticed a stray #, although I'm probably just
> nit-picking.

Huh. I found out how to make it work, but I'm not sure why this
kludge... I ran up etheral, and sniffed the packets, since it knows
LDAP packets. In the modify request, the DN was blank! So, poking around
some more, I got the bright idea to go from:

$dn=$info["dn"];

to

$dn=$info[0]["dn"];

Since it, really a multi-dim array. Well, it works now. Sorry
for the bother.

Tim

-- 
Tim Sailer <sailer at bnl.gov> 
Application Services
Information Technology Division
Brookhaven National Laboratory  (631) 344-3001



More information about the talk mailing list