Russian Ukraine English
Catalog RSS


ldap_set_option

(unknown)

ldap_set_option -- Set the value of the given option

Description

boolean ldap_set_option (int link_identifier, int option, mixed newval)

Sets the value of the specified option to be newval, and returns true on success and false on error.

The parameter option can be one of: LDAP_OPT_DEREF, LDAP_OPT_SIZELIMIT, LDAP_OPT_TIMELIMIT, LDAP_OPT_PROTOCOL_VERSION, LDAP_OPT_ERROR_NUMBER, LDAP_OPT_REFERRALS, LDAP_OPT_RESTART, LDAP_OPT_HOST_NAME, LDAP_OPT_ERROR_STRING, LDAP_OPT_MATCHED_DN. These are described in draft-ietf-ldapext-ldap-c-api-xx.txt

This function is only available when using OpenLDAP 2.x.x OR Netscape Directory SDK x.x, and was added in PHP 4.0.4

Example 1. Set protocol version


// $ds is a valid link identifier for a directory server if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3))     echo "Using LDAPv3"; else     echo "Failed to set protocol version to 3"; 

See also ldap_get_option().

Led