summaryrefslogtreecommitdiff
path: root/ext/ldap/tests/ldap_connect_error.phpt
blob: b93375c39e9b53d423fc949323a5a37837e89f26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
ldap_connect() - Connection errors
--CREDITS--
Patrick Allaert <patrickallaert@php.net>
# Belgian PHP Testfest 2009
--INI--
ldap.max_links=1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
require "connect.inc";

// too many arguments
var_dump(ldap_connect(null, null, null));
var_dump(ldap_connect("ldap://$host:$port/$base"));

$links = array();
$links[0] = ldap_connect($host, $port);
$links[1] = ldap_connect($host, $port);
?>
===DONE===
--EXPECTF--
Warning: ldap_connect() expects at most 2 parameters, 3 given in %s on line %d
bool(false)

Warning: ldap_connect(): Could not create session handle: %s in %s on line %d
bool(false)

Warning: ldap_connect(): Too many open links (1) in %s on line %d
===DONE===