Lines Matching refs:mysqli

2 new mysqli()
18 …if ($mysqli = new mysqli($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $sock…
22 if (false !== $mysqli)
23 printf("[004] Expecting boolean/false, got %s/%s\n", gettype($mysqli), $mysqli);
26 ini_set('mysqli.default_socket', $socket);
27 …if (!is_object($mysqli = new mysqli($host, $user, $passwd, $db, $port)) || (0 !== mysqli_connect_e…
28 printf("[005] Usage of mysqli.default_socket failed\n") ;
30 $mysqli->close();
33 ini_set('mysqli.default_port', $port);
34 …if (!is_object($mysqli = new mysqli($host, $user, $passwd, $db)) || (0 !== mysqli_connect_errno())…
35 printf("[006] Usage of mysqli.default_port failed\n") ;
37 $mysqli->close();
40 ini_set('mysqli.default_pw', $passwd);
41 if (!is_object($mysqli = new mysqli($host, $user)) || (0 !== mysqli_connect_errno())) {
42 printf("[007] Usage of mysqli.default_pw failed\n") ;
44 $mysqli->close();
47 ini_set('mysqli.default_user', $user);
48 if (!is_object($mysqli = new mysqli($host)) || (0 !== mysqli_connect_errno())) {
49 printf("[008] Usage of mysqli.default_user failed\n") ;
51 $mysqli->close();
54 ini_set('mysqli.default_host', $host);
55 if (!is_object($mysqli = new mysqli()) || (0 !== mysqli_connect_errno())) {
56 printf("[012] Failed to create mysqli object\n");
58 // There shall be NO connection! Using new mysqli(void) shall not use defaults for a connection!
59 // We had long discussions on this and found that the ext/mysqli API as
62 if (NULL !== ($tmp = @$mysqli->query('SELECT 1'))) {
64 $mysqli->close();
69 ini_set('mysqli.default_host', 'p:' . $host);
70 if (!is_object($mysqli = new mysqli())) {
72 printf("[010] Failed to create mysqli object\n");
74 // There shall be NO connection! Using new mysqli(void) shall not use defaults for a connection!
75 // We had long discussions on this and found that the ext/mysqli API as
78 if (NULL !== ($tmp = @$mysqli->query('SELECT 1'))) {
80 $mysqli->close();
90 $mysqli = new mysqli($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket);
93 $mysqli->close();
98 ini_set('mysqli.default_socket', $socket);
100 $mysqli = new mysqli($host, $user, $passwd, $db, $port);
101 $mysqli->close();
104 printf("[017] Usage of mysqli.default_socket failed\n") ;
107 ini_set('mysqli.default_port', $port);
109 $mysqli = new mysqli($host, $user, $passwd, $db);
110 $mysqli->close();
113 printf("[018] Usage of mysqli.default_port failed\n") ;
116 ini_set('mysqli.default_pw', $passwd);
118 $mysqli = new mysqli($host, $user);
119 $mysqli->close();
122 printf("[019] Usage of mysqli.default_pw failed\n");
125 ini_set('mysqli.default_user', $user);
127 $mysqli = new mysqli($host);
128 $mysqli->close();
131 printf("[020] Usage of mysqli.default_user failed\n") ;
134 ini_set('mysqli.default_host', $host);
137 $mysqli = mysqli_init();
138 $mysqli->real_connect();
140 $mysqli->close();
144 printf("[021] Usage of mysqli.default_host failed\n");
150 Warning: mysqli::mysqli(): (%s/%d): Access denied for user '%sunknown%s'@'%s' (using password: %s) …