Re: Inconsistancy in PDO dsn

From: Date: Fri, 28 Apr 2006 00:19:06 +0000
Subject: Re: Inconsistancy in PDO dsn
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-23000@lists.php.net to get a copy of this message
The manual doesn't tell you that you can use spaces, so simply don't do it. --Wez. On 4/27/06, Kevin Waterson <kevin@oceania.net> wrote: > Not a bug, but inconsistant behavior in PDO when calling > $dsn = new PDO("sqlite: dbname.sdb"); > > The space after the colon _should_ be encoded but if not it fails and > needs correctly to read > $dsn = new PDO("sqlite:dbname.sdb"); > > Pierre pointed to a user note in the manual > http://www.php.net/manual/en/ref.pdo.php > > 01-Jan-2006 04:09 > Watch out for putting spaces in the DSN > mysql:host=localhost;dbname=test works > mysql: host = localhost; dbname=test works > mysql: host = localhost; dbname = test doesn't work... > > Here we see the inconsistancy at work. > perhaps E_STRICT would be a better way to handle this perhaps > some other. > > Kind regards > Kevin > > -- > "Democracy is two wolves and a lamb voting on what to have for lunch. > Liberty is a well-armed lamb contesting the vote." > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#23000) next »