Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion reference/ldap/constants.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@
</term>
<listitem>
<simpara>
Specifies a bitwise level for debug traces.
Specifies a bitwise level for debug traces. The traces are written to
<literal>stderr</literal>. The levels are defined by OpenLDAP, in its
<filename>ldap_log.h</filename> header; PHP does not expose them as
constants.
</simpara>
</listitem>
</varlistentry>
Expand Down
18 changes: 18 additions & 0 deletions reference/ldap/functions/ldap-set-option.xml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,24 @@ if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) {
echo "Failed to set server controls";
}
?>
]]>
</programlisting>
</example>
<example>
<title>Debugging a connection issue</title>
<programlisting role="php">
<![CDATA[
<?php
// A NULL connection sets the option for the whole process (OpenLDAP only).
// Set before ldap_connect(), it also traces the initialization; set later,
// only the operations that follow are traced.
// 7 combines the OpenLDAP levels 1 (trace), 2 (packets) and 4 (arguments).
// The traces are written to stderr, not to the output of the script.
ldap_set_option(null, LDAP_OPT_DEBUG_LEVEL, 7);

$ds = ldap_connect("ldaps://ldap.example.com:636");
ldap_bind($ds);
?>
]]>
</programlisting>
</example>
Expand Down
Loading