1--TEST-- 2ldap_bind() - Binding that should fail 3--CREDITS-- 4Patrick Allaert <patrickallaert@php.net> 5# Belgian PHP Testfest 2009 6--SKIPIF-- 7<?php require_once('skipif.inc'); ?> 8<?php require_once('skipifbindfailure.inc'); ?> 9--FILE-- 10<?php 11require "connect.inc"; 12 13$link = ldap_connect($host, $port); 14ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version); 15 16// Invalid password 17var_dump(ldap_bind($link, $user, "ThisIsNotCorrect$passwd")); 18 19// Invalid DN syntax 20var_dump(ldap_bind($link, "unexistingProperty=weirdValue,$user", $passwd)); 21?> 22--EXPECTF-- 23Warning: ldap_bind(): Unable to bind to server: Invalid credentials in %s on line %d 24bool(false) 25 26Warning: ldap_bind(): Unable to bind to server: Invalid DN syntax in %s on line %d 27bool(false) 28