File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / ldap / tests / skipifbindfailure.inc
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:57 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

<?php
require_once 'connect.inc';

if ($skip_on_bind_failure) {

	$link = ldap_connect($host, $port);
	ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
	if (!@ldap_bind($link, $user, $passwd))
		die(sprintf("skip Can't bind to LDAP Server - [%d] %s", ldap_errno($link), ldap_error($link)));

	ldap_unbind($link);
}
?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>