Lines Matching refs:dsn
46 $dsn = PDO_MYSQL_TEST_DSN;
49 tryandcatch(8, '$db = new PDO("' . $dsn . '");');
53 print tryandcatch(9, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
56 $dsn = 'mysql:';
58 tryandcatch(10, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
60 $dsn = PDO_MYSQL_TEST_DSN;
64 $db = new PDO($dsn, $user, $pass);
67 $dsn = 'mysql:invalid=foo';
68 tryandcatch(11, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
70 $dsn = 'mysql:' . str_repeat('howmuch=canpdoeat;', 1000);
71 tryandcatch(12, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
73 $dsn = 'mysql:' . str_repeat('abcdefghij', 1024 * 10) . '=somevalue';
74 tryandcatch(13, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");');
81 $dsn = MySQLPDOTest::getDSN(array('host' => $host), 'host=' . $invalid_host);
82 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
88 $dsn = MySQLPDOTest::getDSN(array('host' => $invalid_host), 'host=' . $host);
89 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
90 printf("[015] DSN=%s, %s\n", $dsn, $e->getMessage());
95 $dsn = MySQLPDOTest::getDSN(array('host' => $invalid_host));
96 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
103 $dsn = MySQLPDOTest::getDSN(array('host' => $invalid_host), 'host=' . $host);
104 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
105 printf("[017] DSN=%s, %s\n", $dsn, $e->getMessage());
112 $dsn = MySQLPDOTest::getDSN(array('host' => str_repeat('0123456789', 100)));
113 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
126 $dsn = MySQLPDOTest::getDSN(array('port' => $port), 'port=' . $invalid_port);
127 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
133 $dsn = MySQLPDOTest::getDSN(array('port' => $invalid_port), 'port=' . $port);
134 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
135 printf("[020] DSN=%s, %s\n", $dsn, $e->getMessage());
139 $dsn = MySQLPDOTest::getDSN(array('port' => $port), 'port=' . $invalid_port);
141 $db = @new PDO($dsn, $user, $pass);
152 $dsn = MySQLPDOTest::getDSN(array('dbname' => $db), 'dbname=' . $invalid_db);
153 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
160 $dsn = MySQLPDOTest::getDSN(array('dbname' => $invalid_db), 'dbname=' . $db);
161 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
162 printf("[023] DSN=%s, %s\n", $dsn, $e->getMessage());
171 … $dsn = MySQLPDOTest::getDSN(array('unix_socket' => $socket), 'unix_socket=' . $invalid_socket);
172 …try { $db = @new PDO($dsn, $user, $pass); assert(false); printf("%s\n", $dsn); } catch (PDOExcepti…
178 … $dsn = MySQLPDOTest::getDSN(array('unix_socket' => $invalid_socket), 'unix_socket=' . $socket);
179 try { $db = @new PDO($dsn, $user, $pass); } catch (PDOException $e) {
180 printf("[025] DSN=%s, %s\n", $dsn, $e->getMessage());
186 $dsn = MySQLPDOTest::getDSN();
188 $db = new PDO($dsn, $user, $pass);
200 printf("[026] DSN=%s, %s\n", $dsn, $e->getMessage());
208 $dsn = MySQLPDOTest::getDSN();
209 $db = new PDO($dsn, $user, $pass);
215 … $dsn = MySQLPDOTest::getDSN(array('charset' => $charset), 'charset=' . $invalid_charset);
217 $db = @new PDO($dsn, $user, $pass);
226 … $dsn = MySQLPDOTest::getDSN(array('charset' => $invalid_charset), 'charset=' . $charset);
228 $db = @new PDO($dsn, $user, $pass);
236 printf("[029] DSN=%s, %s\n", $dsn, $e->getMessage());
249 $dsn = MySQLPDOTest::getDSN();
250 $db = new PDO($dsn, $user, $pass);
261 $dsn = MySQLPDOTest::getDSN(array('charset' => 'latin1'));
262 $db = new PDO($dsn, $user, $pass);
267 $dsn, $tmp['_charset'], 'latin1');
274 $dsn = MySQLPDOTest::getDSN(array('charset' => 'latin2'));
275 $db = new PDO($dsn, $user, $pass);
280 $dsn, $tmp['_charset'], 'latin2');
299 [002] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a
300 [003] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a
301 [004] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a
302 [005] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a
303 [006] PDO::__construct(): Argument #1 ($dsn) must be a valid data source name, [n/a] n/a