CVS update: php3/doc/functions
| From: | eschmid | Date: | Mon, 10 Aug 1998 19:18:48 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-80@lists.php.net to get a copy of this message | ||
Date: Monday August 10, 1998 @ 15:18
Author: eschmid
Update of /repository/php3/doc/functions
In directory asf:/tmp/cvs-serv21328
Modified Files:
ldap.sgml
Log Message:
Fixed and added some. Wrong date on the cvs server?
Index: php3/doc/functions/ldap.sgml
diff -c php3/doc/functions/ldap.sgml:1.17 php3/doc/functions/ldap.sgml:1.18
*** php3/doc/functions/ldap.sgml:1.17 Sun Aug 9 16:47:11 1998
--- php3/doc/functions/ldap.sgml Mon Aug 10 15:18:48 1998
***************
*** 29,35 ****
</para><para>
The equivalent to the fully qualified file reference in LDAP is
the "distinguished name", referred to simply as "dn". An example
! dn might be
</para>
<literallayout>
cn=John Smith,ou=Accounts,o=My Company,c=US
--- 29,35 ----
</para><para>
The equivalent to the fully qualified file reference in LDAP is
the "distinguished name", referred to simply as "dn". An example
! dn might be.
</para>
<literallayout>
cn=John Smith,ou=Accounts,o=My Company,c=US
***************
*** 56,91 ****
</para>
<sect1>
- <title>More Information</title>
- <para>
- Lots of information about LDAP can be found at
- </para>
-
- <itemizedlist>
- <listitem>
- <para>
- <ulink url="&url.ldap.netscape;">Netscape</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="&url.ldap.michigan;">University of Michigan</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="&url.ldap.ldapworld;">LDAP World</ulink>
- </para>
- </listitem>
- </itemizedlist>
-
- <para>
- The Netscape SDK contains a helpful Programmer's Guide in .html
- format.
- </para>
- </sect1>
-
- <sect1>
<title>Complete code example</title>
<para>
Retrieve information for all entries where the surname starts
--- 56,61 ----
***************
*** 94,100 ****
</para>
<example>
! <title>Simple LDAP search</title>
<programlisting role=php>
<?php
// basic sequence with LDAP is connect, bind, search, interpret search
--- 64,70 ----
</para>
<example>
! <title>LDAP search example</title>
<programlisting role=php>
<?php
// basic sequence with LDAP is connect, bind, search, interpret search
***************
*** 106,112 ****
echo "connect result is ".$ds."<p>";
if ($ds) {
! echo "Binding ..";
$r=ldap_bind($ds); // this is an "anonymous" bind, typically
// read-only access echo "Bind result is
echo "Bind result is ".$r."<p>";
--- 76,82 ----
echo "connect result is ".$ds."<p>";
if ($ds) {
! echo "Binding ...";
$r=ldap_bind($ds); // this is an "anonymous" bind, typically
// read-only access echo "Bind result is
echo "Bind result is ".$r."<p>";
***************
*** 123,129 ****
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>";
}
--- 93,99 ----
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>";
}
***************
*** 132,146 ****
ldap_close($ds);
} else {
! echo ">l4>Unable to connect to LDAP server</h4>";
}
?>
</programlisting>
</example>
! </sect1>
</partintro>
<refentry id="function.ldap-add">
<refnamediv>
--- 102,194 ----
ldap_close($ds);
} else {
! echo "<h4>Unable to connect to LDAP server</h4>";
}
?>
</programlisting>
</example>
! <sect2>
! <title>Using the PHP LDAP calls</title>
! <para>
! You will need to get and compile LDAP client libraries from
! either the University of Michigan ldap-3.3 package or the
! Netscape Directory SDK. You will also need to recompile PHP
! with LDAP support enabled before PHP's LDAP calls will work.
! </para><para>
! Before you can use the LDAP calls you will need to know ..
!
! <itemizedlist>
! <listitem>
! <para>
! The name or address of the directory server you will use
! </para>
! </listitem>
! <listitem>
! <para>
! The "base dn" of the server (the part of the world directory
! that is held on this server, which could be "o=My
! Company,c=US")
! </para>
! </listitem>
! <listitem>
! <para>
! Whether you need a password to access the server (many servers
! will provide read access for an "anonymous bind" but require a
! password for anything else)
! </para>
! </listitem>
! </itemizedlist>
!
! <para>
! The typical sequence of LDAP calls you will make in an
! application will follow this pattern:
! <literallayout>
! ldap_connect() // establish connection to server
! |
! ldap_bind() // anonymous or authenticated "login"
! |
! do something like search or update the directory
! and display the results
! |
! ldap_close() // "logout"
! </literallayout>
! </sect2>
!
!
! <sect2>
! <title>More Information</title>
! <para>
! Lots of information about LDAP can be found at
! </para>
!
! <itemizedlist>
! <listitem>
! <para>
! <ulink url="&url.ldap.netscape;">Netscape</ulink>
! </para>
! </listitem>
! <listitem>
! <para>
! <ulink url="&url.ldap.michigan;">University of Michigan</ulink>
! </para>
! </listitem>
! <listitem>
! <para>
! <ulink url="&url.ldap.ldapworld;">LDAP World</ulink>
! </para>
! </listitem>
! </itemizedlist>
!
! <para>
! The Netscape SDK contains a helpful Programmer's Guide in .html
! format.
! </para>
! </sect2>
! </sect1>
</partintro>
+
<refentry id="function.ldap-add">
<refnamediv>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net