Re: pear-db dsn and mysql sockets

From: Date: Fri, 11 Jan 2002 23:15:47 +0000
Subject: Re: pear-db dsn and mysql sockets
References: 1  Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-3907@lists.php.net to get a copy of this message
Sorry for the crosspost. Discussion should go on in pear-dev.. In <pan.2002.01.11.23.59.31.569001.4708@php.net>, Christian Stocker wrote: > Hi > > 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? chregu

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