cvs: /phpdoc/functions ldap.sgml

From: Date: Fri, 10 Sep 1999 09:50:57 +0000
Subject: cvs: /phpdoc/functions ldap.sgml
Groups: php.dev 
Request: Send a blank email to php-dev+get-10795@lists.php.net to get a copy of this message
eschmid Fri Sep 10 05:50:57 1999 EDT Modified files: /phpdoc/functions ldap.sgml Log: The character '<'is invalid in SGML. Index: phpdoc/functions/ldap.sgml diff -u phpdoc/functions/ldap.sgml:1.3 phpdoc/functions/ldap.sgml:1.4 --- phpdoc/functions/ldap.sgml:1.3 Fri Sep 10 05:01:46 1999 +++ phpdoc/functions/ldap.sgml Fri Sep 10 05:50:56 1999 @@ -1058,7 +1058,9 @@ <refentry id="function.ldap-err2str"> <refnamediv> <refname>ldap_err2str</refname> - <refpurpose>Convert LDAP error number into string error message</refpurpose> + <refpurpose> + Convert LDAP error number into string error message + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1068,20 +1070,19 @@ </funcsynopsis> <para> returns string error message. - <para> - This function returns the string error message explaining - the error number errno. While LDAP errno numbers are - standardized, different libraries return different or - even localized textual error messages. Never check for - a specific error message text, but always use an error - number to check. <para> - see also <function>ldap_errno</function> and + This function returns the string error message explaining the + error number errno. While LDAP errno numbers are standardized, + different libraries return different or even localized textual + error messages. Never check for a specific error message text, + but always use an error number to check. + <para> + see also <function>ldap_errno</function> and <function>ldap_error</function>. <example> <title>Enumerating all LDAP error messages</title> -<programlisting role=php> +<programlisting role="php"> &lt;?php for($i=0; $i<100; $i++) { printf("Error $i: %s&lt;br>\n", ldap_str2err($i)); @@ -1095,7 +1096,9 @@ <refentry id="function.ldap-errno"> <refnamediv> <refname>ldap_errno</refname> - <refpurpose>Return the LDAP error number of the last LDAP command</refpurpose> + <refpurpose> + Return the LDAP error number of the last LDAP command + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1104,47 +1107,50 @@ <paramdef>int <parameter>link_id</parameter></paramdef> </funcsynopsis> <para> - return the LDAP error number of the last LDAP command for this link. - <para> - This function returns the standardized error number - returned by the last LDAP command for the given link - identifier. This number can be converted into a textual - error message using <function>ldap_err2str</function>. - <para> - Unless you lower your warning level in your php3.ini sufficiently - or prefix your LDAP commands with @ (at) characters to suppress - warning output, the errors generated will also show up in your - HTML output. - <example> - <title>Generating and catching an error</title> -<programlisting role=php> + return the LDAP error number of the last LDAP command for this + link. + <para> + This function returns the standardized error number returned by + the last LDAP command for the given link identifier. This number + can be converted into a textual error message using + <function>ldap_err2str</function>. + <para> + Unless you lower your warning level in your php3.ini sufficiently + or prefix your LDAP commands with @ (at) characters to suppress + warning output, the errors generated will also show up in your + HTML output. + <example> + <title>Generating and catching an error</title> +<programlisting role="php"> &lt;?php - // This example contains an error, which we will catch. - $ld = ldap_connect("localhost"); - $bind = ldap_bind($ld); - // syntax error in filter expression (errno 87), - // must be "objectclass=*" to work. - $res = @ldap_search($ld, "o=Myorg, c=DE", "objectclass"); - if (!$res) { - printf("LDAP-Errno: %s<br>\n", ldap_errno($ld)); - printf("LDAP-Error: %s<br>\n", ldap_error($ld)); - die("Argh!<br>\n"); - } - $info = ldap_get_entries($ld, $res); - printf("%d matching entries.<br>\n", $info["count"]); +// This example contains an error, which we will catch. +$ld = ldap_connect("localhost"); +$bind = ldap_bind($ld); +// syntax error in filter expression (errno 87), +// must be "objectclass=*" to work. +$res = @ldap_search($ld, "o=Myorg, c=DE", "objectclass"); +if (!$res) { + printf("LDAP-Errno: %s&lt;br>\n", ldap_errno($ld)); + printf("LDAP-Error: %s&lt;br>\n", ldap_error($ld)); + die("Argh!&lt;br>\n"); +} +$info = ldap_get_entries($ld, $res); +printf("%d matching entries.&lt;br>\n", $info["count"]); ?> </programlisting> </example> <para> - see also <function>ldap_err2str</function> and - <function>ldap_error</function>. + see also <function>ldap_err2str</function> and + <function>ldap_error</function>. </refsect1> </refentry> <refentry id="function.ldap-error"> <refnamediv> <refname>ldap_error</refname> - <refpurpose>Return the LDAP error message of the last LDAP command</refpurpose> + <refpurpose> + Return the LDAP error message of the last LDAP command + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1152,24 +1158,24 @@ <funcdef>string <function>ldap_error</function></funcdef> <paramdef>int <parameter>link_id</parameter></paramdef> </funcsynopsis> + <para> + returns string error message. <para> - returns string error message. - <para> - This function returns the string error message explaining - the error generated by the last LDAP command for the given - link identifier. While LDAP errno numbers are - standardized, different libraries return different or - even localized textual error messages. Never check for - a specific error message text, but always use an error - number to check. - <para> - Unless you lower your warning level in your php3.ini sufficiently - or prefix your LDAP commands with @ (at) characters to suppress - warning output, the errors generated will also show up in your - HTML output. + This function returns the string error message explaining the + error generated by the last LDAP command for the given link + identifier. While LDAP errno numbers are standardized, different + libraries return different or even localized textual error + messages. Never check for a specific error message text, but + always use an error number to check. + <para> + Unless you lower your warning level in your + <filename>php3.ini</filename> sufficiently or prefix your LDAP + commands with <literal>@</literal> (at) characters to suppress + warning output, the errors generated will also show up in your + HTML output. <para> - see also <function>ldap_err2str</function> and - <function>ldap_errno</function>. + see also <function>ldap_err2str</function> and + <function>ldap_errno</function>. </refsect1> </refentry> </reference>

« previous php.dev (#10795) next »