Doc #55248 [Opn->Csd]: example data are inconsistent

From: Date: Tue, 07 May 2013 07:27:19 +0000
Subject: Doc #55248 [Opn->Csd]: example data are inconsistent
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9792@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55248&edit=1 ID: 55248 Updated by: salathe@php.net Reported by: drupal at paratio dot com Summary: example data are inconsistent -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Ubuntu 10.4 LTS PHP Version: Irrelevant -Assigned To: +Assigned To: salathe Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Fixed in revision 330183 by removing the 'mail' line. Previous Comments: ------------------------------------------------------------------------ [2011-12-02 17:14:41] drupal at paratio dot com Hello frozenfire, I think who wants to use this php function should know how LDAP works. We can provide two examples are the best way to describe how to handle a simple and a more complex LDAP data entry. In the the first example the mail-attribute should be removed because it's wrong: $info["cn"] = "John Jones"; $info["sn"] = "Jones"; $info["objectclass"] = "person"; The second example with email is a little bit more complex because a second objectclass: $info["cn"] = "John Jones"; $info["sn"] = "Jones"; $info["mail"] = "jonj@example.com"; $info["objectclass"][] = "person"; $info["objectclass"][] = "inetOrgPerson"; Maybe an information about LDAP is helpful because LDAP only accept right structured data. If you want to save any kind of attribute you have to declare additionally the right objectclass. The next thing to understand is that the LDAP server has to know the right information schema where the objectclasses are described. This only ca be handled with LDAP configuration not by PHP. The objectclass "person" is provided by the schema "core" and the objectclass "inetOrgPerson" is provided by the schema "inetorgperson". If somebody needs other data structures as existing schemas can provide there is only one clean way to declare: You need to request an organisation number from the IANA (Internet Assigned Numbers Authority). kind regards, Carsten ------------------------------------------------------------------------ [2011-07-27 22:30:38] frozenfire@php.net I'd prefer to make the latter change, expanding the example, rather than removing that bit. But, I've not used LDAP, so I'm unsure how to represent that functionality. Could you provide some example code to do so? I'd greatly appreciate that. Otherwise, I'll just remove the line. ------------------------------------------------------------------------ [2011-07-20 06:25:27] drupal at paratio dot com Description: ------------ --- From manual page: http://www.php.net/function.ldap-add%23Examples --- This are the example data: $info["cn"] = "John Jones"; $info["sn"] = "Jones"; $info["mail"] = "jonj@example.com"; $info["objectclass"] = "person"; The objectclass "person" does not contain the mail attribute. So this example doesn't work with LDAP. Just remove the mail entry or expand the example with the object class "inetOrgPerson" where "mail" is a MAY attribute. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55248&edit=1

« previous php.doc.bugs (#9792) next »