Skip site navigation (1) Skip section navigation (2)

Re: How to select the source ip address for a connection to thedatabase server

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: How to select the source ip address for a connection to thedatabase server
Date: 2009-09-07 10:49:42
Message-ID: h82og6$dpv$6@reversiblemaps.ath.cx (view raw or flat)
Thread:
Lists: pgsql-php
On 2009-09-06, Dimitris Sakellarios <dimitris(dot)sakellarios(at)telesuite(dot)gr> wrote:
>
> That is the way sockets normally work, the primary address is always 
> used for outgoing connections. It can not be changed without some low 
> level programming. It is necessary to bind the socket to the specific IP 
> address before opening the connection. I have done it with Perl, but not 
> PHP.
>
> Bob McConnell
> N2SPP
>

basically what you need to do is take the libpq source extend the
conneection-string facility to include
bind-to-port and bind-to-address parameters which bind the outgoing
connection to the named resources and then recompile it and get it
installed on your server

no changes are likely to be needed to PHP




In response to

pgsql-php by date

Next:From: Ronald D. WillisDate: 2009-09-09 05:24:32
Subject: Re: Stored procedures, PDO, and PHP issue
Previous:From: Jasen BettsDate: 2009-09-07 10:40:21
Subject: Re: How to select the source ip address for a connection to the database server

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group