1--TEST--
2ldap_connect() - Connection errors
3--CREDITS--
4Patrick Allaert <patrickallaert@php.net>
5# Belgian PHP Testfest 2009
6--INI--
7ldap.max_links=1
8--SKIPIF--
9<?php require_once('skipif.inc'); ?>
10--FILE--
11<?php
12require "connect.inc";
13
14// too many arguments
15var_dump(ldap_connect(null, null, null));
16var_dump(ldap_connect("ldap://$host:$port/$base"));
17
18$links = array();
19$links[0] = ldap_connect($host, $port);
20$links[1] = ldap_connect($host, $port);
21?>
22===DONE===
23--EXPECTF--
24Warning: ldap_connect() expects at most 2 parameters, 3 given in %s on line %d
25bool(false)
26
27Warning: ldap_connect(): Could not create session handle: %s in %s on line %d
28bool(false)
29
30Warning: ldap_connect(): Too many open links (1) in %s on line %d
31===DONE===
32