[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldap_mod_add() (creating attributes)

--- Steve Sobol <sjsobol@NorthShoreTechnologies.net>
> Hans Zauner wrote:
> > Thank you for the reply, however I get the same
> > problem.  I might be misunderstanding something
> > fundemental, though.
> > 
> > I need to deal with a form that outputs fields,
> lets
> > say "firstname" and "lastname".  In PHP, I get an
> > array, HTTP_POST_VARS, which has elements
> "firstname"
> > and "lastname".  I want to be able to, if
> possible,
> > simply do something like this:
> > 
> > ldap_add($ldap, $dn, $HTTP_POST_VARS);
> This wouldn't work. $HTTP_POST_VARS is an array.

This would work if the elements were named as
predefined LDAP attributes.  ldap_add() expects an
array as the last argument.

> > When I do this, however, I get the "Undefined
> > attribute type" error, which I presume, is because
> > slapd is looking for elements named "cn" and "sn".
> And that's probably another reason it wouldn't work.
> You'd probably need to pass the individual CGI
> variables.
> This isn't really an LDAP question, it's a PHP
> question...
> you may get a more accurate answer on one of the PHP
> lists.

I guess this is my question, and I'm sorry for the
confusion:  With LDAP can I make my own schema
(attributes and/or objectclass) or am I locked in to
using the predefines (ie. person,inetorgperson,etc)?  
The predefined objects/attribs don't really fit what I

I would like to be able to create myObjectclass with
my own (all plaintext strings) attributes (firstname,
lastname, extension, etc) instead of the standard
cn,sn, etc.

Maybe MySQL is more what I need/want.  

Thank you,

Hans Zauner

> -- 
> Steve Sobol, BOFH, President    888.480.4NET
> 866.DSL.EXPRESS 216.619.2NET
> North Shore Technologies Corporation  
> http://NorthShoreTechnologies.net
> JustTheNet/JustTheNet EXPRESS DSL (ISP Services)
> http://JustThe.net
> mailto:sjsobol@NorthShoreTechnologies.net   Proud
> resident of Cleveland, Ohio

Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!