Hi there, I think the problem is your $sort parameter on Zend_Ldap::search(). 'asc' doesn't seem to be an attribute of your result entries. The $sort parameters utilizes ldap_sort() which requires a single valid LDAP attribute on which it'll sort the result set in ascending order (the attribute specified in $sort must be included in the $attributes array you pass as the 4th argument to Zend_Ldap::search()).
So, assumed that you have the following $this->_groupRecordAttributes: Array( 'cn', 'sn', 'uid' ) And you want to sort the result by 'sn', you'd do: $this->_groupRecordAttributes = array( 'cn', 'sn', 'uid' ); $limit = Zend_Ldap:: SEARCH_SCOPE_ONE; // or whatever search scope you want. $this->_ldap->search("cn=*schoolofp*", $this->_ldapOptions['baseDn'], $limit, $this->_groupRecordAttributes, 'sn'); By the way, you could set the $baseDn parameter to null to automatically use the Zend_Ldap instance's base DN: $this->_ldap->search("cn=*schoolofp*", null, $limit, $this->_groupRecordAttributes, 'sn'); Hope that helps... Best regards Stefan Stefan Gehrig Component Lead Zend_Ldap -----Ursprüngliche Nachricht----- Von: waigani [mailto:waig...@gmail.com] Gesendet: Montag, 10. Mai 2010 00:45 An: fw-general@lists.zend.com Betreff: [fw-general] Zend_Ldap_Collection_Iterator_Default::next() error Zend_Ldap_Collection_Iterator_Default::next() throws the following error: 0x54 (Decoding error): getting next entry (0x54 (Decoding error)) I am am searching a Apple OpenLdap ODM. The following code throws the error: $result = $this->_ldap->search("cn=*schoolofp*", $this->_ldapOptions['baseDn'], $limit, $this->_groupRecordAttributes, 'asc', null); $result->toArray(); Is there a problem in the library or is this particular to my code / ldap? Has anyone else hit this? My best guess, from what i can see, is that it throws the error when the iterator tries to get the last record, which does not exist due to the array index being out by one. Thanks -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Zend-Ldap-Collection-It erator-Default-next-error-tp2164783p2164783.html Sent from the Zend Framework mailing list archive at Nabble.com.