[Dbbalancer-users] Re: PHP with dbBalancer and PostgreSQL !!!
Status: Alpha
Brought to you by:
xperience
From: Andrew M. <an...@ca...> - 2002-12-21 21:25:34
|
On Sun, 2002-12-22 at 03:57, Ricardo wrote: > Hi Dear Andrew, > > My name is Ricardo Greco, I am brazilian and I'm a beginner in PHP. > > I have a single question about using PHP with dbBalancer . > > Any suggestion will be hardly appreciated ! > > Well, > > I have a Red Hat 7.3 (kernel 2.4.18) Linux Box running the latest > versions of Apache, PHP and PostgreSQL. > > In order to get benefits of connection pooling, I read some about > dbBalancer, but I think its documentation is very resumed. > > I wish to know the following : > > After installing dbBalancerDaemon (binary), what is needed in my PHP > code to invoke PostgreSQL Access through this proxy (dbBalancer) ? > > Other question : Is it possible a combination with ADOdb and > dbBalancer ? You need to either: (a) run PostgreSQL on a non-standard port, and have dbbalancer connect to that port and serve PostgreSQL on the standard port I.e. 5432). or (b) run PostgreSQL on it's standard port, and have DBBalancer connect to it on that port and serve on a different port. Then in your PHP code you connect to the different port: $db_connection = pg_connect("dbname=mydb user=general port=5442"); which is the way I tend to do it. I choose the second option because I usually have multiple databases running on the same system, and DBBalancer can only serve up one database on any given port, so you end up doing it on a non-standard port for your second database anyway. Hope this helps, Andrew. > > Thanks in advance ! > > Ricardo Greco > Recife-PE Brazil > rg...@no... > > > -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ --------------------------------------------------------------------- |