1--TEST-- 2ldap_sasl_bind() - Basic anonymous binding 3--CREDITS-- 4Patrick Allaert <patrickallaert@php.net> 5# Belgian PHP Testfest 2009 6--SKIPIF-- 7<?php require_once('skipif.inc'); ?> 8<?php if (!function_exists("ldap_sasl_bind")) die("skip LDAP extension not compiled with SASL support"); ?> 9<?php 10 require "connect.inc"; 11 $link = @fsockopen($host, $port); 12 if (!$link) { 13 die("skip no server listening"); 14 } 15?> 16--FILE-- 17<?php 18require "connect.inc"; 19 20$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 21insert_dummy_data($link, $base); 22ldap_unbind($link); 23 24$link = ldap_connect($host, $port); 25ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version); 26var_dump(ldap_sasl_bind($link, null, $sasl_passwd, 'DIGEST-MD5', 'realm', $sasl_user)); 27?> 28--CLEAN-- 29<?php 30include "connect.inc"; 31 32$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 33remove_dummy_data($link, $base); 34?> 35--EXPECT-- 36bool(true) 37