Applied new structure, adding constants here. This means some

reorganization in the docs of course.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@89483 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Gabor Hojtsy 2002-07-22 16:12:52 +00:00
parent 25ab3fcec2
commit f5a92cd8ac
2 changed files with 333 additions and 68 deletions

View file

@ -0,0 +1,246 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<section id="ldap.constants">
&reftitle.constants;
&extension.constants;
<variablelist>
<varlistentry>
<term>
<constant>LDAP_DEREF_NEVER</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_DEREF_SEARCHING</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_DEREF_FINDING</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_DEREF_ALWAYS</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_DEREF</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_SIZELIMIT</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_TIMELIMIT</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_PROTOCOL_VERSION</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_ERROR_NUMBER</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_REFERRALS</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_RESTART</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_HOST_NAME</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_ERROR_STRING</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_MATCHED_DN</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_SERVER_CONTROLS</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_CLIENT_CONTROLS</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>LDAP_OPT_DEBUG_LEVEL</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>GSLC_SSL_NO_AUTH</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>GSLC_SSL_ONEWAY_AUTH</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>GSLC_SSL_TWOWAY_AUTH</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

View file

@ -1,32 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<reference id="ref.ldap">
<title>LDAP functions</title>
<titleabbrev>LDAP</titleabbrev>
<partintro>
<section id="ldap.intro">
<title>Introduction to LDAP</title>
&reftitle.intro;
<para>
LDAP is the Lightweight Directory Access Protocol, and is a
protocol used to access "Directory Servers". The Directory is a
protocol used to access "Directory Servers". The Directory is a
special kind of database that holds information in a tree
structure.
</para>
<para>
The concept is similar to your hard disk directory structure,
except that in this context, the root directory is "The world"
and the first level subdirectories are "countries". Lower levels
and the first level subdirectories are "countries". Lower levels
of the directory structure contain entries for companies,
organisations or places, while yet lower still we find directory
entries for people, and perhaps equipment or documents.
</para>
<para>
To refer to a file in a subdirectory on your hard disk, you might
use something like
use something like:
</para>
<literallayout>
/usr/local/myapp/docs
/usr/local/myapp/docs
</literallayout>
<para>
The forwards slash marks each division in the reference, and the
@ -34,41 +34,101 @@
</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.
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
cn=John Smith,ou=Accounts,o=My Company,c=US
</literallayout>
<para>
The comma marks each division in the reference, and the sequence
is read from right to left. You would read this dn as ..
is read from right to left. You would read this dn as:
</para>
<literallayout>
country = US
organization = My Company
organizationalUnit = Accounts
commonName = John Smith
country = US
organization = My Company
organizationalUnit = Accounts
commonName = John Smith
</literallayout>
<para>
In the same way as there are no hard rules about how you organise
the directory structure of a hard disk, a directory server
manager can set up any structure that is meaningful for the
purpose. However, there are some conventions that are used. The
purpose. However, there are some conventions that are used. The
message is that you can not write code to access a directory
server unless you know something about its structure, any more
than you can use a database without some knowledge of what is
available.
</para>
<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.openldap;">OpenLDAP Project</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>
</section>
<section id="ldap-example">
<title>Complete code example</title>
<para>
Retrieve information for all entries where the surname starts
with "S" from a directory server, displaying an extract with
name and email address.
</para>
<section id="ldap.requirements">
&reftitle.required;
<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 3.0 to compile PHP with LDAP support.
</para>
</section>
<section id="ldap.installation">
&reftitle.install;
<para>
LDAP support in PHP is not enabled by default. You will need to
use the <link linkend="install.configure.with-ldap">--with-ldap</link>
configuration option when compiling PHP to enable LDAP support.
</para>
</section>
<section id="ldap.configuration">
&reftitle.runtime;
&no.config;
</section>
<section id="ldap.resources">
&reftitle.resources;
&no.resource;
</section>
&reference.ldap.constants;
<section id="ldap.examples">
&reftitle.examples;
<para>
Retrieve information for all entries where the surname starts
with "S" from a directory server, displaying an extract with
name and email address.
</para>
<example>
<title>LDAP search example</title>
@ -114,18 +174,14 @@ if ($ds) {
}
?>
]]>
</programlisting>
</example>
</programlisting>
</example>
</section>
<section id="ldap.using">
<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 3.0. 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 ..
<para>
Before you can use the LDAP calls you will need to know ..
<itemizedlist>
<listitem>
@ -163,43 +219,6 @@ if ($ds) {
ldap_close() // "logout"
</literallayout></para>
</section>
<section id="ldap.moreinfo">
<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.openldap;">OpenLDAP Project</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>
</section>
</section>
</partintro>
&reference.ldap.functions;