Re: Re(4): [PEAR] wrapper for a wrapper

From: Date: Thu, 24 Jan 2002 08:14:58 +0000
Subject: Re: Re(4): [PEAR] wrapper for a wrapper
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-712@lists.php.net to get a copy of this message
I was trapped by this circumstance last April already when I tried to write a kewl database gui with php-gtk. In the meantime I patched the source so in CVS mysql_connect() has an extra, optional parameter bool which creates a new link even if user/pass/host are the same when passed as true. I know some other DBs have this limitation too (pgsql I think), but I've no idea about oracle. On Thu, Jan 24, 2002 at 08:25:01AM +0100, Quinn Comendant wrote : > Markus, > > You are correct! Connecting to MySQL with a different user for each > database works. This is an annoying limitation, but I can live with it. > > I ran my tests again calling two databases using PEAR::DB and also PHP's > mysql calls (with and without persistant connections). The one-user-per- > database limitation is there for all of them. > > I wonder what the feature vs. bug angle is on this limitation. One of the > reasons I'm bringing PEAR::DB into my applications is because I may be > moving to Oracle in the future. I wonder if the same limitation applies. > > Boy, I wish I asked you my question before I spent 3 solid days > troubleshooting. > > Yours, > Quinn > > > > > > > 2002-01-24 6:33 -- Markus Fischer --------------------------- > > >On Thu, Jan 24, 2002 at 06:13:40AM +0100, Quinn Comendant wrote : > >> My host is back up now, but I've attached my code to this email. You can > >> see in 'example.php' how I'm connecting to the databases. > > > > No attachments/code, please. I can wait until your site is > > reachable. > > > >> The databasedriver is mysql. I am using a different database in each > >> connection, but I connect with the same user/pass. If I repeat the test > >> calling PEAR::DB directly, I am able to connect to separate databases > >> fine. The problem is somewhere in my code. > > > > Are you really sure? > > > > There's a known limitation of the myqsl driver that if you > > connect to a database server with same user/pass/host name > > twice you get back the same link and thus changing the > > database for one link will change it on the other link too. > > > > So I wonder how this can work with your PEAR::DB only setup > > anyway. > > > > - Markus > >-- > >Please always Cc to me when replying to me on the lists. > -- Please always Cc to me when replying to me on the lists.

« previous php.pear.general (#712) next »