ID: 50323
Comment by: alfredorj at walla dot com
Reported By: winner5 at interia dot pl
Status: Open
Bug Type: PDO related
Operating System: Linux
PHP Version: 5.3.1
New Comment:
Why do you don't go to see if I'm on the corner?
This bug is not a bug! Who does make a database with ";" chars?
You are a really loser.
Previous Comments:
------------------------------------------------------------------------
[2009-11-29 13:25:13] winner5 at interia dot pl
Description:
------------
There is no way to escape semicolon in dsn to be treated like a char,
not as a separator.
Reproduce code:
---------------
<?php
$pdo = new PDO('mysql:host=localhost;dbname=t\\;', 'user', 'pass');
?>
Expected result:
----------------
Successfully established connection
Actual result:
--------------
Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[42000] [1049] Unknown database 't\'' in ./index.php:1
Stack trace:
#0 ./index.php(1): PDO->__construct('mysql:host=loca...', 'user',
'pass')
#1 {main}
thrown in ./index.php on line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50323&edit=1