NYCPHP Meetup

NYPHP.org

[nycphp-talk] Retrieving LDAP data on DN of specific record

edward potter edwardpotter at gmail.com
Thu Dec 21 10:45:12 EST 2006


LDAP was a plot by grad school English majors, started as a hoax  - to
drive programmers crazy!  For some strange reason, it just took off.
The syntax is insane.

sorry, I don't know the answer to this one! :-)

-ed

On 12/21/06, Randal Rust <randalrust at gmail.com> wrote:
> In my LDAP system, I can display all organizations. From that list, I
> need to link to a summary page. I have been trying to do this by
> passing the DN in the query string, and then using this function to
> retrieve the data:
>
>         function viewOrganization($db, $value){
>                 global $display;
>                 $rs=ldap_read($db->ds, $db->dn, '(dn='.$value.')');
>                 if(!$rs){
>                         $display->errors=true;
>                         $display->errorM.='<p><strong>ERROR: '.ldap_error($ds).'</strong></p>';
>                         }
>                 if(!$display->errors){
>                         $info = ldap_get_entries($db->ds, $rs);
>                         print_r($info);
>                         }
>                 }
>
> The problem is that if I pass the DN, $info is always empty.
>
> If I modify things so that I pass the value of the custom RECORDID
> attribute, then it works fine. So why can't I retrieve on the DN?
>
> --
> Randal Rust
> R.Squared Communications
> www.r2communications.com
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>


-- 
the Blog: http://www.utopiaparkway.com
the Karma: http://www.coderswithconscience.com
the Projects: http://flickr.com/photos/86842405@N00/
the Store: http://astore.amazon.com/httpwwwutopic-20



More information about the talk mailing list