With the patch introduced in the bug below (which has been included in CVS), the parameters for this function should be:
bool ldap_sasl_bind ( resource $link [, string $binddn [, string $password [, string $sasl_mech [, string $sasl_realm [, string $sasl_authc_id [, string $sasl_authz_id [, string $props]]]]]]] )
Some example calls:
$r=ldap_sasl_bind ( $ds, NULL, 'mysecret', 'DIGEST-MD5', NULL, 'jimmy');
With authz_id, specifying a dn:
$r=ldap_sasl_bind ( $ds, NULL, 'mysecret', 'DIGEST-MD5', NULL, 'jimmy', 'dn:uid=tommy,ou=people,dc=example,dc=com');
With authz_id, specifying a SASL username:
$r=ldap_sasl_bind ( $ds, NULL, 'mysecret', 'DIGEST-MD5', NULL, 'jimmy', 'u:tommy');
Also, since SASL authentication was introduced in LDAP version 3,
you may need to explicitly set the version number with:
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_sasl_bind
(PHP 5)
ldap_sasl_bind — SASL を使用して LDAP ディレクトリにバインドする
説明
bool ldap_sasl_bind
( resource $link
[, string $binddn
[, string $password
[, string $sasl_mech
[, string $sasl_realm
[, string $sasl_authz_id
[, string $props
]]]]]] )
警告
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
返り値
成功した場合に TRUE を、失敗した場合に FALSE を返します。
注意
注意: 前提条件
ldap_sasl_bind() は SASL サポート(sasl.h)を必要とします。PHP の configure 時に --with-ldap-sasl が指定されている ことを確認してください。さもないとこの関数は未定義となります。
ldap_sasl_bind
dwhite at olp dot net
22-Sep-2007 05:30
22-Sep-2007 05:30
dahgdevash at gmail dot com
25-May-2007 10:44
25-May-2007 10:44
Bug , the function parameters are sent incorrectly to the server
Look at:
http://bugs.php.net/bug.php?id=39291
