Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.5

Bug #11470 Schema loading error
Submitted: 2007-06-28 12:52 UTC
From: miliamber Assigned: beni
Status: Closed Package: Net_LDAP (version 1.0.0RC2)
PHP Version: 5.2.0 OS: Linux
Roadmaps: 1.0.0    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 18 - 10 = ?

 
 [2007-06-28 12:52 UTC] miliamber (Stefan Kittner)
Description: ------------ Schema loading error but explicit schema loading ($ldap->schema()) is functional. Test script: --------------- <?php require_once 'Net/LDAP.php'; PEAR::setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_WARNING); $ldap_config = array( 'host' => 'ldaps://ldap.example.com', 'binddn' => 'uid=admin,ou=people,dc=example,dc=com', 'bindpw' => '****', 'tls' => false, 'base' => 'dc=example,dc=acs', 'port' => 636 ); $ldap = Net_LDAP::connect($ldap_config); $entry = $ldap->getEntry('cn=myCommonName,ou=orgUnit,dc=example,dc=com', array('uniqueMember','cn')); Expected result: ---------------- Warning: Could not find attribute subschemasubentry: in /usr/share/php5/PEAR/PEAR.php on line 892 Warning: Could not find attribute attributetypes: in /usr/share/php5/PEAR/PEAR.php on line 892 Warning: Could not find attribute matchingrules: in /usr/share/php5/PEAR/PEAR.php on line 892 Warning: Could not find attribute objectclasses: in /usr/share/php5/PEAR/PEAR.php on line 892 Warning: Could not find attribute ldapsyntaxes: in /usr/share/php5/PEAR/PEAR.php on line 892 Warning: Unknown attribute (dITContentRules) requested: in /usr/share/php5/PEAR/PEAR.php on line 892 Warning: Unknown attribute (dITStructureRules) requested: in /usr/share/php5/PEAR/PEAR.php on line 892 Warning: Unknown attribute (matchingRuleUse) requested: in /usr/share/php5/PEAR/PEAR.php on line 892 Warning: Unknown attribute (nameForms) requested: in /usr/share/php5/PEAR/PEAR.php on line 892

Comments

 [2007-06-29 06:49 UTC] beni (Benedikt Hallinger)
I get only the following errors: Warning: Could not find attribute subschemasubentry: in /usr/share/php/PEAR.php on line 892 Warning: Could not find attribute attributetypes: in /usr/share/php/PEAR.php on line 892 Warning: Could not find attribute objectclasses: in /usr/share/php/PEAR.php on line 892 Warning: Unknown attribute (dITContentRules) requested: in /usr/share/php/PEAR.php on line 892 Warning: Unknown attribute (dITStructureRules) requested: in /usr/share/php/PEAR.php on line 892 Warning: Unknown attribute (matchingRules) requested: in /usr/share/php/PEAR.php on line 892 Warning: Unknown attribute (matchingRuleUse) requested: in /usr/share/php/PEAR.php on line 892 Warning: Unknown attribute (nameForms) requested: in /usr/share/php/PEAR.php on line 892 Warning: Unknown attribute (ldapSyntaxes) requested: in /usr/share/php/PEAR.php on line 892 The first three errors (Could not find attribute ...) are caused in the Net_LDAP_Schema->get() method. The other messages are created by Net_LDAP_Entry->getValue() method since the schema is an entry in the directory
 [2007-06-29 10:46 UTC] miliamber (Stefan K.)
It is a bug or bogus? I mean why default getting the schema?
 [2007-07-04 19:28 UTC] beni (Benedikt Hallinger)
Sorry i havent fully understood, what you meant in your last note. Schema is fetched automatically if you try to read attribute values, so Net_LDAP can decide wehter to get the values in binary or in text form. Explicit schema loading use the same method as indirect schmea loading through the entry object. Maybe Jan has some results already, he said that he will look over this bug at monday.
 [2007-10-18 07:34 UTC] beni (Benedikt Hallinger)
I found out that the problem is caused because the schema entry tries itself to fetch the schema which will fail. I introduced a new $_initialized variable to Net_LDAP_Schema which will turn to true once the Schema has been parsed. If it is false, then Net_LDAP_Schema::get() will not return a Net_LDAP_Error in case of failure (which will always happen, since the second call to LDAP->schema() thinks, the schema has been initialized already, which is not true, so Schema->get() always fails)
 [2007-10-18 08:22 UTC] beni (Benedikt Hallinger)
This bug has been resolved in CVS. Additionally to the issue with the uninitialized schema queriyng the schema, a problem occured with fetching the schema entries attributes. I implemented a check to see if the attribute exists in the schema, so it will be only fetched if it exists, avoiding the error. Missing attributes where skipped already, but in high error reoporting mode a error was generated.