RE: [PHP-WIN] LDAP / Exchange
| From: | Mikkel Staunholm | Date: | Tue, 25 Jul 2000 06:22:55 +0000 |
| Subject: | RE: [PHP-WIN] LDAP / Exchange | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1287@lists.php.net to get a copy of this message | ||
Thanks for the answer.
Didn't work, though. Here's the output:
LDAP query test
Connecting ...connect result is 1
Binding ...Bind result is 1
Searching...
Warning: LDAP: Unable to perform the search: Operations error in
e:\inetpub\staunsholm.dk\ldaptest.php on line 17
Search result is
Warning: 0 is not a LDAP result index in
e:\inetpub\staunsholm.dk\ldaptest.php on line 20
Number of entires returned is
Getting entries ...
Warning: 0 is not a LDAP result index in
e:\inetpub\staunsholm.dk\ldaptest.php on line 23
Data for items returned:
Closing connection
> -----Original Message-----
> From: Dale Hirt [mailto:dale@sbcltd.com]
> Sent: 24. juli 2000 19:24
> To: PHP Windows (E-mail)
> Subject: RE: [PHP-WIN] LDAP / Exchange
>
>
> Try using a FQDN for the host name. Instead of localhost, try
> www.yourserver.com. Then, try changing sn=S* to cn=S*, then change
> o=SorensenS to c=US.
>
> -----Original Message-----
> From: Mikkel Staunholm [mailto:mikkel@staunsholm.dk]
> Sent: Monday, July 24, 2000 3:00 AM
> To: 'Dale Hirt'
> Subject: RE: [PHP-WIN] LDAP / Exchange
>
>
> IIS5 + Exchange 5.5 + sp3 on w2k standard server. All on the same
> machine.
>
> I'm using this script:
>
> <%
> echo "<h3>LDAP query test</h3>";
> echo "Connecting ...";
> $ds = ldap_connect("localhost");
> echo "connect result is ".$ds."<p>";
>
> if ($ds) {
> echo "Binding ...";
> $r = ldap_bind($ds);
> echo "Bind result is $r<p>";
>
> echo "Searching...";
> // Search surname entry
> $sr = ldap_search($ds, "o=SorensenS", "sn=S*");
> echo "Search result is $sr<p>";
>
> echo "Number of entires returned is
> ".ldap_count_entries($ds,$sr)."<p>";
>
> echo "Getting entries ...<p>";
> $info = ldap_get_entries($ds, $sr);
> echo "Data for ".$info["count"]." items returned:<p>";
>
> for ($i = 0; $i < $info["count"]; $i++) {
> echo "dn is: ".$info[$i]["dn"]."<br>";
> echo "first cn entry is: ".$info[$i]["cn"][0]."<br>";
> echo "first email entry is:
> ".$info[$i]["mail"][0]."<p>";
> }
>
> echo "Closing connection";
> ldap_close($ds);
>
> } else {
> echo "<h4>Unable to connect to LDAP server</h4>";
> }
> %>
>
> > -----Original Message-----
> > From: Dale Hirt [mailto:dale@sbcltd.com]
> > Sent: 21. juli 2000 18:50
> > To: PHP Windows (E-mail)
> > Subject: RE: [PHP-WIN] LDAP / Exchange
> >
> >
> > What's your setup? what's the code that you are using? I
> had next to
> > no
> > problems communicating with Exchange.
> >
> > -----Original Message-----
> > From: Mikkel Staunholm [mailto:mikkel@staunsholm.dk]
> > Sent: Friday, July 21, 2000 6:49 AM
> > To: php-windows@lists.php.net
> > Subject: [PHP-WIN] LDAP / Exchange
> >
> >
> > Anyone out there using LDAP (or IMAP4) and PHP to communicate with
> > Exchange?
> >
> > I simply cannot make a ldap_search() work. I can login and
> > bind, but no
> > search: Operational Error.
> >
> > Maybe it's my base DN?
> >
> > Mikkel.
> >
> >
> > --
> > Mikkel Staunsholm
> > SorensenS Reklame & Marketing A/S
> > Gyldenlundsvej 7, DK-2920 Charlottenlund
> > Phone: +45 39642500 Fax: +45 39644201
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-windows-help@lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin@lists.php.net
> >
>