Re: How to select the source ip address for a connection to the database server - Mailing list pgsql-php

From Jasen Betts
Subject Re: How to select the source ip address for a connection to the database server
Date
Msg-id h82og6$dpv$6@reversiblemaps.ath.cx
Whole thread Raw
In response to How to select the source ip address for a connection to the database server  (dimitris.sakellarios@telesuite.gr)
List pgsql-php
On 2009-09-06, Dimitris Sakellarios <dimitris.sakellarios@telesuite.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




pgsql-php by date:

Previous
From: Jasen Betts
Date:
Subject: Re: How to select the source ip address for a connection to the database server
Next
From: "Santiago Galindo"
Date:
Subject: Web based visual query builder