Lines Matching refs:dsn

44         $dsn = PDO_MYSQL_TEST_DSN;
47 tryandcatch(8, '$db = new PDO("' . $dsn . '");');
51 print tryandcatch(9, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
54 $dsn = 'mysql:';
56 tryandcatch(10, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
58 $dsn = PDO_MYSQL_TEST_DSN;
62 $db = new PDO($dsn, $user, $pass);
65 $dsn = 'mysql:invalid=foo';
66 tryandcatch(11, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
68 $dsn = 'mysql:' . str_repeat('howmuch=canpdoeat;', 1000);
69 tryandcatch(12, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
71 $dsn = 'mysql:' . str_repeat('abcdefghij', 1024 * 10) . '=somevalue';
72 tryandcatch(13, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
79 $dsn = MySQLPDOTest::getDSN(array('host' => $host), 'host=' . $invalid_host);
80 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
86 $dsn = MySQLPDOTest::getDSN(array('host' => $invalid_host), 'host=' . $host);
87 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
88 printf("[015] DSN=%s, %s\n", $dsn, $e->getMessage());
93 $dsn = MySQLPDOTest::getDSN(array('host' => $invalid_host));
94 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
101 $dsn = MySQLPDOTest::getDSN(array('host' => $invalid_host), 'host=' . $host);
102 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
103 printf("[017] DSN=%s, %s\n", $dsn, $e->getMessage());
109 $dsn = MySQLPDOTest::getDSN(array('host' => str_repeat('0123456789', 100)));
110 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
123 $dsn = MySQLPDOTest::getDSN(array('port' => $port), 'port=' . $invalid_port);
124 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
130 $dsn = MySQLPDOTest::getDSN(array('port' => $invalid_port), 'port=' . $port);
131 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
132 printf("[020] DSN=%s, %s\n", $dsn, $e->getMessage());
136 $dsn = MySQLPDOTest::getDSN(array('port' => $port), 'port=' . $invalid_port);
138 $db = @new PDO($dsn, $user, $pass);
148 $dsn = MySQLPDOTest::getDSN(array('dbname' => $db), 'dbname=' . $invalid_db);
149 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
156 $dsn = MySQLPDOTest::getDSN(array('dbname' => $invalid_db), 'dbname=' . $db);
157 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
158 printf("[023] DSN=%s, %s\n", $dsn, $e->getMessage());
166 … $dsn = MySQLPDOTest::getDSN(array('unix_socket' => $socket), 'unix_socket=' . $invalid_socket);
167 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
173 … $dsn = MySQLPDOTest::getDSN(array('unix_socket' => $invalid_socket), 'unix_socket=' . $socket);
174 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
175 printf("[025] DSN=%s, %s\n", $dsn, $e->getMessage());
180 $dsn = MySQLPDOTest::getDSN();
182 $db = new PDO($dsn, $user, $pass);
194 printf("[026] DSN=%s, %s\n", $dsn, $e->getMessage());
202 $dsn = MySQLPDOTest::getDSN();
203 $db = new PDO($dsn, $user, $pass);
209 … $dsn = MySQLPDOTest::getDSN(array('charset' => $charset), 'charset=' . $invalid_charset);
211 $db = @new PDO($dsn, $user, $pass);
220 … $dsn = MySQLPDOTest::getDSN(array('charset' => $invalid_charset), 'charset=' . $charset);
222 $db = @new PDO($dsn, $user, $pass);
230 printf("[029] DSN=%s, %s\n", $dsn, $e->getMessage());
241 $dsn = MySQLPDOTest::getDSN();
242 $db = new PDO($dsn, $user, $pass);
253 $dsn = MySQLPDOTest::getDSN(array('charset' => 'latin1'));
254 $db = new PDO($dsn, $user, $pass);
259 $dsn, $tmp['_charset'], 'latin1');
266 $dsn = MySQLPDOTest::getDSN(array('charset' => 'latin2'));
267 $db = new PDO($dsn, $user, $pass);
272 $dsn, $tmp['_charset'], 'latin2');
289 [002] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a
290 [003] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a
291 [004] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a
292 [005] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a
293 [006] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a