Lines Matching refs:mysqli
2 new mysqli()
4 mysqli
17 /* mysqli.default_socket requires non-empty string */
18 ini_set('mysqli.default_socket', 'socket');
20 ini_set('mysqli.default_port', 9999);
21 ini_set('mysqli.default_pw', 'password');
22 ini_set('mysqli.default_user', 'user');
23 ini_set('mysqli.default_host', 'host');
29 ini_set('mysqli.default_socket', $socket);
31 $mysqli = mysqli_init();
32 $mysqli->real_connect($host, $user, $passwd, $db, $port);
34 if (!$res = $mysqli->query("SELECT 'mysqli.default_socket' AS testing"))
35 printf("[001] [%d] %s\n", $mysqli->errno, $mysqli->error);
39 if (!isset($tmp['testing']) || $tmp['testing'] != 'mysqli.default_socket') {
40 printf("[002] mysqli.default_socket not properly set?\n");
44 $mysqli->close();
48 printf("[002] Usage of mysqli.default_socket failed\n");
52 ini_set('mysqli.default_port', $port);
54 $mysqli = mysqli_init();
55 $mysqli->real_connect($host, $user, $passwd, $db);
57 if (!$res = $mysqli->query("SELECT 'mysqli.default_port' AS testing"))
58 printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
62 $mysqli->close();
66 printf("[004] Usage of mysqli.default_port failed\n");
69 ini_set('mysqli.default_pw', $passwd);
71 $mysqli = mysqli_init();
72 $mysqli->real_connect($host, $user);
73 $mysqli->select_db($db);
75 if (!$res = $mysqli->query("SELECT 'mysqli.default_pw' AS testing"))
76 printf("[005] [%d] %s\n", $mysqli->errno, $mysqli->error);
80 $mysqli->close();
84 printf("[006] Usage of mysqli.default_pw failed\n");
87 ini_set('mysqli.default_user', $user);
89 $mysqli = mysqli_init();
90 $mysqli->real_connect($host);
91 $mysqli->select_db($db);
93 if (!$res = $mysqli->query("SELECT 'mysqli.default_user' AS testing"))
94 printf("[007] [%d] %s\n", $mysqli->errno, $mysqli->error);
98 $mysqli->close();
102 printf("[008] Usage of mysqli.default_user failed\n");
105 ini_set('mysqli.default_host', $host);
107 $mysqli = mysqli_init();
108 $mysqli->real_connect();
109 $mysqli->select_db($db);
111 if (!$res = $mysqli->query("SELECT 1"))
112 printf("[009] [%d] %s\n", $mysqli->errno, $mysqli->error);
115 if (!$res = $mysqli->query("SELECT SUBSTRING_INDEX(USER(),'@',1) AS username"))
116 printf("[010] [%d] %s\n", $mysqli->errno, $mysqli->error);
123 $mysqli->close();
127 printf("[012] Usage of mysqli.default_host failed\n");
131 $link = mysqli_connect($host, $user, $passwd, null, ini_get('mysqli.default_port'));
162 string(19) "mysqli.default_port"
166 string(17) "mysqli.default_pw"
170 string(19) "mysqli.default_user"