diff --git a/reference/ldap/constants.xml b/reference/ldap/constants.xml
new file mode 100644
index 0000000000..fbfe776cc7
--- /dev/null
+++ b/reference/ldap/constants.xml
@@ -0,0 +1,246 @@
+
+
+
+ &reftitle.constants;
+ &extension.constants;
+
+
+
+ LDAP_DEREF_NEVER
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_DEREF_SEARCHING
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_DEREF_FINDING
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_DEREF_ALWAYS
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_DEREF
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_SIZELIMIT
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_TIMELIMIT
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_PROTOCOL_VERSION
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_ERROR_NUMBER
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_REFERRALS
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_RESTART
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_HOST_NAME
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_ERROR_STRING
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_MATCHED_DN
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_SERVER_CONTROLS
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_CLIENT_CONTROLS
+ (integer)
+
+
+
+
+
+
+
+
+
+ LDAP_OPT_DEBUG_LEVEL
+ (integer)
+
+
+
+
+
+
+
+
+
+ GSLC_SSL_NO_AUTH
+ (integer)
+
+
+
+
+
+
+
+
+
+ GSLC_SSL_ONEWAY_AUTH
+ (integer)
+
+
+
+
+
+
+
+
+
+ GSLC_SSL_TWOWAY_AUTH
+ (integer)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/ldap/reference.xml b/reference/ldap/reference.xml
index 71305d1d14..7f549a3841 100644
--- a/reference/ldap/reference.xml
+++ b/reference/ldap/reference.xml
@@ -1,32 +1,32 @@
-
+
LDAP functionsLDAP
- Introduction to LDAP
+ &reftitle.intro;
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.
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.
To refer to a file in a subdirectory on your hard disk, you might
- use something like
+ use something like:
- /usr/local/myapp/docs
+ /usr/local/myapp/docs
The forwards slash marks each division in the reference, and the
@@ -34,41 +34,101 @@
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:
- cn=John Smith,ou=Accounts,o=My Company,c=US
+ cn=John Smith,ou=Accounts,o=My Company,c=US
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:
- country = US
- organization = My Company
- organizationalUnit = Accounts
- commonName = John Smith
+ country = US
+ organization = My Company
+ organizationalUnit = Accounts
+ commonName = John Smith
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.
+
+ Lots of information about LDAP can be found at
+
+
+
+
+
+ Netscape
+
+
+
+
+ University of Michigan
+
+
+
+
+ OpenLDAP Project
+
+
+
+
+ LDAP World
+
+
+
+
+
+ The Netscape SDK contains a helpful Programmer's Guide in HTML format.
+
-
- Complete code example
-
- Retrieve information for all entries where the surname starts
- with "S" from a directory server, displaying an extract with
- name and email address.
-
+
+ &reftitle.required;
+
+ 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.
+
+
+
+
+ &reftitle.install;
+
+ LDAP support in PHP is not enabled by default. You will need to
+ use the --with-ldap
+ configuration option when compiling PHP to enable LDAP support.
+
+
+
+
+ &reftitle.runtime;
+ &no.config;
+
+
+
+ &reftitle.resources;
+ &no.resource;
+
+
+ &reference.ldap.constants;
+
+
+ &reftitle.examples;
+
+ Retrieve information for all entries where the surname starts
+ with "S" from a directory server, displaying an extract with
+ name and email address.
+ LDAP search example
@@ -114,18 +174,14 @@ if ($ds) {
}
?>
]]>
-
-
+
+
+ Using the PHP LDAP calls
-
- 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.
-
- Before you can use the LDAP calls you will need to know ..
+
+ Before you can use the LDAP calls you will need to know ..
@@ -163,43 +219,6 @@ if ($ds) {
ldap_close() // "logout"
-
-
- More Information
-
- Lots of information about LDAP can be found at
-
-
-
-
-
- Netscape
-
-
-
-
- University of Michigan
-
-
-
-
- OpenLDAP Project
-
-
-
-
- LDAP World
-
-
-
-
-
- The Netscape SDK contains a helpful Programmer's Guide in .html
- format.
-
-
-
-
&reference.ldap.functions;