Re: LDAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nothing is being blocked since both servers are inside the DMZ.

On 8/21/07, Daniel Brown <parasane@xxxxxxxxx> wrote:
>
> On 8/21/07, Dan Shirah <mrsquash2@xxxxxxxxx> wrote:
> > Okay, hopefully someone can help me out here.  I've gone over ldap at
> > php.net and multiple other sites but can't get it to work. Everytime I
> run
> > the query my results are "0 entries returned".
> >
> > My AD tree is: CN=Users,DC=domain,DC=us.  I have the AD Server set so
> that
> > anonymous access to retrieve information is enabled.
> >
> > Below is my code.  Any ideas?
> >
> >
> > <?php
> >     $ldap_host = "AD Server";
> >     $ldap_port = "389";
> >     $base_dn = "DC=domain,DC=us";
> >     $filter = "(CN=users)";
> >     $connect = ldap_connect( $ldap_host, $ldap_port);
> >     ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
> >
> >     $bind = ldap_bind($connect);
> >     $read = ldap_search($connect, $base_dn, $filter);
> >
> >     $info = ldap_get_entries($connect, $read);
> >     echo $info["count"]." entries returned<BR><BR>";
> >     for($row = 0; $row<$info["count"]; $row++)
> >     {
> >         for($column = 0; $column<$info[$row]["count"]; $column++)
> >         {
> >             $data = $info[$row][$column];
> >             echo $data.":".$info[$row][$data][0]."<BR>";
> >         }
> >         echo "<BR>";
> >     }
> > ldap_close($connect);
> > ?>
> >
>
>    This may be kind of a dumb question....  but did you check your
> firewall settings?
>
> --
> Daniel P. Brown
> [office] (570-) 587-7080 Ext. 272
> [mobile] (570-) 766-8107
>
> Hey, PHP-General list....
> 50% off for life on web hosting plans $10/mo. or more at
> http://www.pilotpig.net/.
> Use the coupon code phpgeneralaug07
> Register domains for about $0.01 more than what it costs me at
> http://domains.pilotpig.net/.
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux