Re: Re: pear-db dsn and mysql sockets

From: Date: Mon, 14 Jan 2002 10:52:09 +0000
Subject: Re: Re: pear-db dsn and mysql sockets
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-4015@lists.php.net to get a copy of this message
> > Is it possible to use a mysql-socket file as a connection parameter in > > pear-db? The obvious (?) > > mysql://user@localhost:/path/to/mysqld.sock/database does not work. > oops. I should not write mails, when i'm really toooo tired. the question > was asked here a few days ago and there was no answer :( maybe then we > should implement it. so, here a little discussion. > > normal way of calling the dsn is > mysql://user@localhost:port/database > > the socket way like in mysql_connect would be: > mysql://user@localhost:/path/to/mysqld.sock/database > > but then. $parsed['database'] is "path/to/mysqld.sock/database" > > if we rewrite parseDSN to just take the name after the last / as the > database and everything before for the port/socker stuff (if there's a > colon), are we getting problems with other possibilities of the dsn in > other rdbms or would this a safe way to do? i recon that the database field sould be longer if you build a driver for DB that could take a file or a long path as a database (db3?)... and afiak the 'localhost:' could be replaced by 'unix:' or 'socket:'... with kind regards, Joffrey van Wageningen

« previous php.pear.dev (#4015) next »