How do i use unix sockets...

Started by Mario Filipeover 27 years ago3 messagesgeneral
Jump to latest
#1Mario Filipe
mjnf@uevora.pt

Hi

I'm using php3 as a web interface to a pgsql database.

So far when i do the pg_Connect i always do it this way :

pg_[p]Connect("localhost","5432","","","dbname");

This creates a tcp/ip connection.

What do I have to change to create just a unix socket connection?

Change the host to ""
Change the port to ""
Change both to ""

Thanks!

Mario Filipe
mjnf@uevora.pt
-----> http://neptuno.sc.uevora.pt/~mjnf <-----

#2Egon Schmid
eschmid@delos.stuttgart.netsurf.de
In reply to: Mario Filipe (#1)
Re: [GENERAL] How do i use unix sockets...

Hi Mario,
start postmaster with -i and set host and port to "". More info can be
found in the PHP3 manual.

-Egon

On Thu, 1 Oct 1998, Mario Filipe wrote:

Show quoted text

Hi

I'm using php3 as a web interface to a pgsql database.

So far when i do the pg_Connect i always do it this way :

pg_[p]Connect("localhost","5432","","","dbname");

This creates a tcp/ip connection.

What do I have to change to create just a unix socket connection?

Change the host to ""
Change the port to ""
Change both to ""

Thanks!

Mario Filipe
mjnf@uevora.pt
-----> http://neptuno.sc.uevora.pt/~mjnf <-----

#3Jackson, DeJuan
djackson@cpsgroup.com
In reply to: Egon Schmid (#2)
RE: [GENERAL] How do i use unix sockets...

Hi

I'm using php3 as a web interface to a pgsql database.

So far when i do the pg_Connect i always do it this way :

pg_[p]Connect("localhost","5432","","","dbname");

just do
pg_[p]Connect('', '', '', '', 'dbname');
PHP assumes that if you supply the location and port that you want
tcp/ip.

Show quoted text

This creates a tcp/ip connection.

What do I have to change to create just a unix socket connection?

Change the host to ""
Change the port to ""
Change both to ""

Thanks!

Mario Filipe
mjnf@uevora.pt
-----> http://neptuno.sc.uevora.pt/~mjnf <-----